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
This commit is contained in:
Jonas Ådahl 2015-06-10 11:08:12 +08:00
parent 999b99a077
commit daa15d94fd

View File

@ -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;