From aadbabf9987705be959074f97f923cc4923b8d6a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Mar 2016 20:01:57 -0500 Subject: [PATCH] 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 --- gdk/wayland/gdkwindow-wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 9439c1abc6..750975a320 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -1633,7 +1633,7 @@ gdk_wayland_window_map (GdkWindow *window) } 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 * position of the device that holds the grab.