[mutter] Don't pass handled key events to GTK+



commit e7d336ab0ef7423820bca9c41c2d1900cc8e162c
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Feb 15 18:17:25 2011 -0500

    Don't pass handled key events to GTK+
    
    If we handle a key event then passing it to GTK+ as well can only
    cause confusion. Normally GTK+ would do nothing with a key event for
    some window it doesn't know about, but plugins might be doing more
    things with the GTK+ event queue.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=642426

 src/core/display.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 947be32..f49ffb8 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1746,9 +1746,10 @@ event_callback (XEvent   *event,
        * we can get into a confused state. So if a keybinding is
        * handled (because it's one of our hot-keys, or because we are
        * in a keyboard-grabbed mode like moving a window, we don't
-       * want to pass the key event to the compositor at all.
+       * want to pass the key event to the compositor or GTK+ at all.
        */
-      bypass_compositor = meta_display_process_key_event (display, window, event);
+      if (meta_display_process_key_event (display, window, event))
+        filter_out_event = bypass_compositor = TRUE;
       break;
     case ButtonPress:
       if (display->grab_op == META_GRAB_OP_COMPOSITOR)



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