GNOME Bugzilla – Bug 644509
Alt-F2: Avoid running programs multiple times
Last modified: 2011-03-22 00:51:37 UTC
Returning true from the event handler seems to fix this for some people, though we don't know why it's happening exactly.
Created attachment 183154 [details] [review] Alt-F2: Avoid running programs multiple times
Moved here from https://bugzilla.redhat.com/show_bug.cgi?id=683884
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.
I'm going to push the patch, filed bug 645482 for another fairly minor problem that this probably triggers with preloading directory completions
Attachment 183154 [details] pushed as 33125e7 - Alt-F2: Avoid running programs multiple times
*** Bug 645480 has been marked as a duplicate of this bug. ***