wayland: Don't crash with offscreen windows

Use gdk_window_get_effective_toplevel when looking for
a suitable transient parent, to skip over offscreen windows
that we might encounter in the window tree. This fixes
a crash in glade.

https://bugzilla.gnome.org/show_bug.cgi?id=763110
This commit is contained in:
Matthias Clasen 2016-03-04 20:01:57 -05:00
parent eef3153265
commit aadbabf998

View File

@ -1633,7 +1633,7 @@ gdk_wayland_window_map (GdkWindow *window)
} }
if (transient_for) if (transient_for)
transient_for = get_popup_parent (gdk_window_get_toplevel (transient_for)); transient_for = get_popup_parent (gdk_window_get_effective_toplevel (transient_for));
/* If the position was not explicitly set, start the popup at the /* If the position was not explicitly set, start the popup at the
* position of the device that holds the grab. * position of the device that holds the grab.