El mié, 06-01-2016 a las 13:04 +0000, Mario Sanchez Prada escribió: > Hi there, > > I just realized that the WebKitWebView widget is not propagating some > GtkWidget's signals on purpose due to a fairly old changeset (see > [1]), and > I can't work out what the rationale behind that change is since > there's no > bug linked from the ChangeLog, and there's not an explanation there > either. > > Carlos, Gustavo or anyone else... could you drop some light on this, > please?
The thing is that in the GTK+ events model, everything is synchronous, so the event handlers return TRUE/FALSE dependening on whether the event was handled by that handler or not. In WebKit2 that happens asynchronously, we need to send the events to the web process that will handled them, so when we return the events handler in the UI process we still don't know if the web process will handle the event or not. In the case of key events we save the event, and when the web process replies we re-emit the event if it was not handled by the web process. This is also problematic, because you could see the events twice. The easiest solution would be to make all event handlers use sync messages, but that would affect the performance I'm afraid. > For the record, this is a problem in an app we have as we need to > handle the > "motion-notify-event" signal from the webview's parent GtkWidget, > which is > not possible atm due to [1], and not sure a workaround would make > sense. Are you using a widget derived from WebKitWebView and handling the event using the default handler? Because if you connect with g_signal_connect you should get the events, since in that case the callback is called before the default handler (motion-notify-event is a G_SIGNAL_RUN_LAST). > Thanks, > Mario > > [1] http://trac.webkit.org/changeset/117594 > _______________________________________________ > webkit-gtk mailing list > [email protected] > https://lists.webkit.org/mailman/listinfo/webkit-gtk > -- Carlos Garcia Campos http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
signature.asc
Description: This is a digitally signed message part
_______________________________________________ webkit-gtk mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-gtk
