[mutter] core: Unset all input events on the GDK connection



commit d63b9a1797a0e153ca9bf54daabcdcc00e0f7233
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Mar 12 14:19:23 2015 +0100

    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

 src/core/frame.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index bfd1b6d..0ab30e4 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -155,6 +155,9 @@ meta_window_ensure_frame (MetaWindow *window)
         unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
         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_ButtonRelease);
         XISetMask (mask.mask, XI_Motion);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]