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 644509 - Alt-F2: Avoid running programs multiple times
Alt-F2: Avoid running programs multiple times
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 645480 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-03-11 15:46 UTC by Colin Walters
Modified: 2011-03-22 00:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Alt-F2: Avoid running programs multiple times (984 bytes, patch)
2011-03-11 15:46 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2011-03-11 15:46:13 UTC
Returning true from the event handler seems to fix this for some
people, though we don't know why it's happening exactly.
Comment 1 Colin Walters 2011-03-11 15:46:15 UTC
Created attachment 183154 [details] [review]
Alt-F2: Avoid running programs multiple times
Comment 2 Colin Walters 2011-03-11 15:46:36 UTC
Moved here from https://bugzilla.redhat.com/show_bug.cgi?id=683884
Comment 3 Owen Taylor 2011-03-22 00:39:13 UTC
Once I got a reproducer in gdb, this actually was pretty easy to understand.

The thing to understand here the distinction between the way that GtkIMContext is designed to work and the way it works under IBus.

The way it is designed to work:

 - Key is passed to gtk_im_context_filter_key_press()
 - If IM method doesnt' want it, returns FALSE, processing continues

What happens with IBus

 - Key is passed to gtk_im_context_filter_key_press()
 - IBus always wants it, sends it off to the input method and returns TRUE, procesing stops
 - When it gets the event back from the input method, it synthesizes a key event including IBUS_HANDLED=1<<24 in the state field
 - When that key event gets back to IBus via gtk_im_context_filter_key_press() it returns FALSE and processing continues

So if you connect *before* not *after* to key-press-event to a widget or actor that is filtering keystrokes via IBus, you'll see each key event twice if you return FALSE to let processing continue. If you are actually ignoring events that you are returning FALSE for, it's harmless, but if you do something on an event and then return FALSE you get this bug.
Comment 4 Owen Taylor 2011-03-22 00:49:49 UTC
I'm going to push the patch, filed bug 645482 for another fairly minor problem that this probably triggers with preloading directory completions
Comment 5 Owen Taylor 2011-03-22 00:50:33 UTC
Attachment 183154 [details] pushed as 33125e7 - Alt-F2: Avoid running programs multiple times
Comment 6 Owen Taylor 2011-03-22 00:51:37 UTC
*** Bug 645480 has been marked as a duplicate of this bug. ***