disable keyboard and mouse input while ob is starting or exiting

This commit is contained in:
Dana Jansens 2003-04-06 18:18:55 +00:00
parent 8ebf2b6a3f
commit d1913d1d01

View file

@ -154,6 +154,8 @@ void event_process(XEvent *e)
switch (e->type) { switch (e->type) {
case ButtonPress: case ButtonPress:
case ButtonRelease: case ButtonRelease:
if (ob_state != State_Running) return;
event_lasttime = e->xbutton.time; event_lasttime = e->xbutton.time;
e->xbutton.state &= ~(LockMask | NumLockMask | ScrollLockMask); e->xbutton.state &= ~(LockMask | NumLockMask | ScrollLockMask);
/* kill off the Button1Mask etc, only want the modifiers */ /* kill off the Button1Mask etc, only want the modifiers */
@ -161,6 +163,8 @@ void event_process(XEvent *e)
Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask); Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask);
break; break;
case KeyPress: case KeyPress:
if (ob_state != State_Running) return;
event_lasttime = e->xkey.time; event_lasttime = e->xkey.time;
e->xkey.state &= ~(LockMask | NumLockMask | ScrollLockMask); e->xkey.state &= ~(LockMask | NumLockMask | ScrollLockMask);
/* kill off the Button1Mask etc, only want the modifiers */ /* kill off the Button1Mask etc, only want the modifiers */
@ -185,6 +189,8 @@ void event_process(XEvent *e)
break; break;
case KeyRelease: case KeyRelease:
if (ob_state != State_Running) return;
event_lasttime = e->xkey.time; event_lasttime = e->xkey.time;
e->xkey.state &= ~(LockMask | NumLockMask | ScrollLockMask); e->xkey.state &= ~(LockMask | NumLockMask | ScrollLockMask);
/* kill off the Button1Mask etc, only want the modifiers */ /* kill off the Button1Mask etc, only want the modifiers */
@ -207,6 +213,8 @@ void event_process(XEvent *e)
} }
break; break;
case MotionNotify: case MotionNotify:
if (ob_state != State_Running) return;
event_lasttime = e->xmotion.time; event_lasttime = e->xmotion.time;
e->xmotion.state &= ~(LockMask | NumLockMask | ScrollLockMask); e->xmotion.state &= ~(LockMask | NumLockMask | ScrollLockMask);
/* kill off the Button1Mask etc, only want the modifiers */ /* kill off the Button1Mask etc, only want the modifiers */