From: Dana Jansens Date: Wed, 29 Jan 2003 00:50:28 +0000 (+0000) Subject: grab the pointer when grabbing the keyboard to discard pointer events X-Git-Tag: openbox-2_3_0~163 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=85706d995c84f7ee7fa3453cae081af96f4559ea;p=dana%2Fopenbox.git grab the pointer when grabbing the keyboard to discard pointer events --- diff --git a/src/bindings.cc b/src/bindings.cc index 78fc74cd..90234038 100644 --- a/src/bindings.cc +++ b/src/bindings.cc @@ -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); }