Commit b62b33c1 authored by Carlos Garnacho's avatar Carlos Garnacho

gtk: Fix event delivery on GTK_PHASE_TARGET controllers

Look up the event target, not the "event widget" which is based on the
event window, and thus points to the toplevel.
parent 3a15c824
......@@ -6961,7 +6961,7 @@ gtk_widget_event_internal (GtkWidget *widget,
event_copy = gdk_event_copy (event);
translate_coordinates (event_copy, widget);
if (widget == gtk_get_event_widget (event_copy))
if (widget == gtk_get_event_target (event_copy))
return_val |= _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_TARGET);
g_signal_emit (widget, widget_signals[EVENT], 0, event_copy, &handled);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment