wayland: Use meta_window_move to position xdg_popup windows

This makes sure we set the user rect as well, which is necessary to
have things not "snap back" to weird locations.
This commit is contained in:
Jasper St. Pierre 2014-05-14 12:00:30 -04:00
parent ff2eb77fcd
commit e2b7b26f28

View File

@ -1004,8 +1004,9 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
} }
window = meta_window_wayland_new (meta_get_display (), surface); window = meta_window_wayland_new (meta_get_display (), surface);
window->rect.x = parent_surf->window->rect.x + x; meta_window_move (window, FALSE,
window->rect.y = parent_surf->window->rect.y + y; parent_surf->window->rect.x + x,
parent_surf->window->rect.y + y);
window->showing_for_first_time = FALSE; window->showing_for_first_time = FALSE;
window->placed = TRUE; window->placed = TRUE;
meta_window_set_transient_for (window, parent_surf->window); meta_window_set_transient_for (window, parent_surf->window);