From daa15d94fd4133cd836b3294c220508af946cdd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 10 Jun 2015 11:08:12 +0800 Subject: [PATCH] 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 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 42ebab46b..0f2714f42 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;