]> Dogcows Code - chaz/openbox/commitdiff
disable keyboard and mouse input while ob is starting or exiting
authorDana Jansens <danakj@orodu.net>
Sun, 6 Apr 2003 18:18:55 +0000 (18:18 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 6 Apr 2003 18:18:55 +0000 (18:18 +0000)
openbox/event.c

index 79befa6625a9bcbffe0125d18616893a60a99003..72ba4d1abe8f019b8ab28dc51a3f904afd857da9 100644 (file)
@@ -154,6 +154,8 @@ void event_process(XEvent *e)
     switch (e->type) {
     case ButtonPress:
     case ButtonRelease:
+        if (ob_state != State_Running) return;
+
        event_lasttime = e->xbutton.time;
        e->xbutton.state &= ~(LockMask | NumLockMask | ScrollLockMask);
        /* kill off the Button1Mask etc, only want the modifiers */
@@ -161,6 +163,8 @@ void event_process(XEvent *e)
                             Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask);
        break;
     case KeyPress:
+        if (ob_state != State_Running) return;
+
        event_lasttime = e->xkey.time;
        e->xkey.state &= ~(LockMask | NumLockMask | ScrollLockMask);
        /* kill off the Button1Mask etc, only want the modifiers */
@@ -185,6 +189,8 @@ void event_process(XEvent *e)
 
        break;
     case KeyRelease:
+        if (ob_state != State_Running) return;
+
        event_lasttime = e->xkey.time;
        e->xkey.state &= ~(LockMask | NumLockMask | ScrollLockMask);
        /* kill off the Button1Mask etc, only want the modifiers */
@@ -207,6 +213,8 @@ void event_process(XEvent *e)
        }
        break;
     case MotionNotify:
+        if (ob_state != State_Running) return;
+
        event_lasttime = e->xmotion.time;
        e->xmotion.state &= ~(LockMask | NumLockMask | ScrollLockMask);
        /* kill off the Button1Mask etc, only want the modifiers */
This page took 0.025135 seconds and 4 git commands to generate.