Commit defa1e9c authored by Carlos Garnacho's avatar Carlos Garnacho

gesture: strengthen against destroyed windows

Bail out when we receive an event with an already destroyed window,
we'll hopefully get reset/cancelled afterwards on grab broken events.

https://bugzilla.gnome.org/show_bug.cgi?id=755352
parent e3d21acc
......@@ -400,7 +400,7 @@ _find_widget_window (GtkGesture *gesture,
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
while (window)
while (window && !gdk_window_is_destroyed (window))
{
gdk_window_get_user_data (window, (gpointer*) &window_widget);
......@@ -474,6 +474,10 @@ _update_widget_coordinates (GtkGesture *gesture,
gint wx, wy, x, y;
event_widget = gtk_get_event_widget (data->event);
if (!event_widget)
return;
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
event_widget_window = gtk_widget_get_window (event_widget);
_get_event_coordinates (data, &event_x, &event_y);
......
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