core: Unset all input events on the GDK connection

With all input events being handled through clutter, this only confuses
things, and most nominally, coerces touch events through places we didn't
intend to, like the window frame.

This makes again all touch events only handled in the passive grab on X11,
while the rest stays pointer (emulated) only.

https://bugzilla.gnome.org/show_bug.cgi?id=745335
This commit is contained in:
Carlos Garnacho 2015-03-12 14:19:23 +01:00 committed by Jasper St. Pierre
parent 72bd934604
commit d63b9a1797

View File

@ -155,6 +155,9 @@ meta_window_ensure_frame (MetaWindow *window)
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 }; unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits }; XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
XISelectEvents (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
frame->xwindow, &mask, 1);
XISetMask (mask.mask, XI_ButtonPress); XISetMask (mask.mask, XI_ButtonPress);
XISetMask (mask.mask, XI_ButtonRelease); XISetMask (mask.mask, XI_ButtonRelease);
XISetMask (mask.mask, XI_Motion); XISetMask (mask.mask, XI_Motion);