wayland: Position popups 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 an xdg_surface, we'd position it relative to top left corner of the
window geometry of that xdg_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=749717
This commit is contained in:
Jonas Ådahl 2015-05-22 16:39:31 +08:00
parent ecebdfc58c
commit 0f47d1bac4

View File

@ -1108,12 +1108,6 @@ gdk_wayland_window_create_xdg_popup (GdkWindow *window,
x = window->x - parent_x;
y = window->y - parent_y;
if (parent_impl->xdg_surface)
{
x -= parent_impl->margin_left;
y -= parent_impl->margin_top;
}
impl->xdg_popup = xdg_shell_get_xdg_popup (display->xdg_shell,
impl->surface,
parent_impl->surface,