[gtk+] wayland: Use effective toplevel as popup parent



commit 1f7094a3e527513e1541bead4323afa80703e8ee
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 14:05:06 2016 +0800

    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 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index e06f396..51a7b02 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)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]