[mutter/wip/multitouchr: 49/73] xi2: Workaround some bugs in XI2 passive grabs
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/multitouchr: 49/73] xi2: Workaround some bugs in XI2 passive grabs
- Date: Sat, 3 Nov 2012 23:54:19 +0000 (UTC)
commit ac187476aeb0cec339688560cc048e778f7ce029
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jul 9 18:48:16 2011 +0200
xi2: Workaround some bugs in XI2 passive grabs
XIAllMasterDevices doesn't quite work for key grabs, so only do
this at the moment for the Virtual Core Keyboard
src/core/device-map-xi2.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/core/device-map-xi2.c b/src/core/device-map-xi2.c
index 7f9ccca..e19e408 100644
--- a/src/core/device-map-xi2.c
+++ b/src/core/device-map-xi2.c
@@ -49,9 +49,12 @@ meta_device_map_xi2_grab_key (MetaDeviceMap *device_map,
mask.mask = meta_device_xi2_translate_event_mask (KeyPressMask |
KeyReleaseMask,
&mask.mask_len);
-
+ /* FIXME: Doesn't seem to work with
+ * XIAllMasterDevices, use the VCK
+ * at the moment
+ */
retval = XIGrabKeycode (display->xdisplay,
- XIAllMasterDevices,
+ META_CORE_KEYBOARD_ID,
keycode, xwindow,
(sync) ? GrabModeSync : GrabModeAsync,
GrabModeAsync, /* Never care about the other device */
@@ -71,7 +74,7 @@ meta_device_map_xi2_ungrab_key (MetaDeviceMap *device_map,
display = meta_device_map_get_display (device_map);
XIUngrabKeycode (display->xdisplay,
- XIAllMasterDevices,
+ META_CORE_KEYBOARD_ID,
keycode, xwindow,
1, &mods);
}
@@ -115,7 +118,8 @@ meta_device_map_xi2_ungrab_button (MetaDeviceMap *device_map,
display = meta_device_map_get_display (device_map);
XIUngrabButton (display->xdisplay,
- XIAllMasterDevices,
+ META_CORE_POINTER_ID,
+ //XIAllMasterDevices,
n_button, xwindow, 1, &mods);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]