main: Set event user data earlier

event_widget is not modified anymore after the assignment from
handle_pointing event and we need the event's user data set for the
_gtk_window_check_handle_wm_event call.
This commit is contained in:
Timm Bäder 2018-01-11 11:58:05 +01:00
parent d1eb8cd809
commit abc0f67cf6

View File

@ -1713,6 +1713,8 @@ gtk_main_do_event (GdkEvent *event)
if (!event_widget)
goto cleanup;
gdk_event_set_user_data (event, G_OBJECT (event_widget));
window_group = gtk_main_get_window_group (event_widget);
device = gdk_event_get_device (event);
@ -1753,8 +1755,6 @@ gtk_main_do_event (GdkEvent *event)
if (check_event_in_child_popover (event_widget, grab_widget))
grab_widget = event_widget;
gdk_event_set_user_data (event, G_OBJECT (event_widget));
/* If the widget receiving events is actually blocked by another
* device GTK+ grab
*/