grab the pointer when grabbing the keyboard to discard pointer events

This commit is contained in:
Dana Jansens 2003-01-29 00:50:28 +00:00
parent e767dd79c7
commit 85706d995c

View file

@ -386,6 +386,8 @@ bool Bindings::grabKeyboard(int screen, PyObject *callback)
if (XGrabKeyboard(**otk::display, root, false, GrabModeAsync,
GrabModeAsync, CurrentTime))
return false;
XGrabPointer(**otk::display, root, false, 0, GrabModeAsync,
GrabModeAsync, None, None, CurrentTime);
_keybgrab_callback = callback;
return true;
}
@ -397,6 +399,7 @@ void Bindings::ungrabKeyboard()
_keybgrab_callback = 0;
XUngrabKeyboard(**otk::display, CurrentTime);
XUngrabPointer(**otk::display, CurrentTime);
}