From 1f7094a3e527513e1541bead4323afa80703e8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 4 Aug 2016 14:05:06 +0800 Subject: [PATCH] wayland: Use effective toplevel as popup parent When using the set transient-for as a popup parent, fetch the effective toplevel instead, otherwise we will position against the wrong coordinate. https://bugzilla.gnome.org/show_bug.cgi?id=769402 --- gdk/wayland/gdkwindow-wayland.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index e06f39654d..51a7b02dc1 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -1706,7 +1706,10 @@ gdk_wayland_window_map (GdkWindow *window) &window->x, &window->y, NULL); } else - transient_for = get_popup_parent (impl->transient_for); + { + transient_for = gdk_window_get_effective_toplevel (impl->transient_for); + transient_for = get_popup_parent (transient_for); + } if (!transient_for) {