grab the pointer when grabbing the keyboard to discard pointer events
This commit is contained in:
parent
e767dd79c7
commit
85706d995c
1 changed files with 3 additions and 0 deletions
|
@ -386,6 +386,8 @@ bool Bindings::grabKeyboard(int screen, PyObject *callback)
|
||||||
if (XGrabKeyboard(**otk::display, root, false, GrabModeAsync,
|
if (XGrabKeyboard(**otk::display, root, false, GrabModeAsync,
|
||||||
GrabModeAsync, CurrentTime))
|
GrabModeAsync, CurrentTime))
|
||||||
return false;
|
return false;
|
||||||
|
XGrabPointer(**otk::display, root, false, 0, GrabModeAsync,
|
||||||
|
GrabModeAsync, None, None, CurrentTime);
|
||||||
_keybgrab_callback = callback;
|
_keybgrab_callback = callback;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -397,6 +399,7 @@ void Bindings::ungrabKeyboard()
|
||||||
|
|
||||||
_keybgrab_callback = 0;
|
_keybgrab_callback = 0;
|
||||||
XUngrabKeyboard(**otk::display, CurrentTime);
|
XUngrabKeyboard(**otk::display, CurrentTime);
|
||||||
|
XUngrabPointer(**otk::display, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue