[Webkit-unassigned] [Bug 136430] [GTK] Key press signal fired twice in WebKit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 1 10:34:46 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=136430





--- Comment #1 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-09-01 10:34:51 PST ---
This is complicated . . . The thing is that the event propagation in GTK+ is synchronous, but events are processed asynchronously in WebKit. When a key is pressed, a message is sent to the web process, the key is processed, and a message is sent back to the UI process with a boolean parameter indicating whether the event has been handled or not. That return value is what we need to decide whether to propagate the event or not, so what we do is always returning TRUE from our key press vmethod to stop the event propagation, and when we get the response from the web process, we reinject the event with gtk_main_do_event() and this time we propagate the event to the parent class depending on the value get from the web process. Since GtkWidget::key-press-event is a G_SIGNAL_RUN_LAST signal, the user connected callbacks are called *before* our vmethod, so when the event is reinjected the user provided callbacks are called again too. A possible workaround for you would be to use g_signal_con

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list