[mutter] xdg-shell: Popups should be placed relative to the parent surface



commit daa15d94fd4133cd836b3294c220508af946cdd8
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Jun 10 11:08:12 2015 +0800

    xdg-shell: Popups should be placed relative to the parent surface
    
    According to the xdg-shell protocol specification the (x, y) coordinates
    passed when creating a popup surface is relative to top left corner of
    the parent surface, but prior to this patch, if the parent surface was
    a xdg_surface, it'd position it relative to top left corner of the
    window geometry of that xdg_surface.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=749716

 src/wayland/meta-wayland-surface.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 42ebab4..0f2714f 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -1273,8 +1273,8 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
 
   window = meta_window_wayland_new (display, surface);
   meta_window_move_frame (window, FALSE,
-                          parent_surf->window->rect.x + x,
-                          parent_surf->window->rect.y + y);
+                          parent_surf->window->buffer_rect.x + x,
+                          parent_surf->window->buffer_rect.y + y);
   window->showing_for_first_time = FALSE;
   window->placed = TRUE;
 


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