After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 642426 - Don't pass handled key events to GTK+
Don't pass handled key events to GTK+
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-15 23:18 UTC by Owen Taylor
Modified: 2011-02-17 16:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't pass handled key events to GTK+ (1.38 KB, patch)
2011-02-15 23:18 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2011-02-15 23:18:58 UTC
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.
Comment 1 Owen Taylor 2011-02-15 23:18:59 UTC
Created attachment 180952 [details] [review]
Don't pass handled key events to GTK+
Comment 2 Dan Winship 2011-02-16 15:53:31 UTC
Comment on attachment 180952 [details] [review]
Don't pass handled key events to GTK+

>-      bypass_compositor = meta_display_process_key_event (display, window, event);
>+      filter_out_event = bypass_compositor = meta_display_process_key_event (display, window, event);

filter_out_event gets set from multiple places. Although there's currently no place where something else could be setting it TRUE and then this would set it FALSE, it seems like that could potentially happen in the future and so it might be safer to say

    if (meta_display_process_key_event (display, window, event))
      bypass_compositor = filter_out_event = TRUE;

Your call.
Comment 3 Owen Taylor 2011-02-17 16:41:12 UTC
Did the:

    if (meta_display_process_key_event (display, window, event))
      bypass_compositor = filter_out_event = TRUE;

thing. As you say it's slightly safer than risking setting them to FALSE and
avoids a very long line too.

Attachment 180952 [details] pushed as e7d336a - Don't pass handled key events to GTK+