Merge branch 'xdg-role-object-from-surface' into 'master'

xdg-shell: add/use wlr_xdg_{toplevel,popup}_from_wlr_xdg_surface()

See merge request wlroots/wlroots!4786
This commit is contained in:
Kirill Primak 2024-08-14 17:49:42 +00:00
commit 198b8b09ac
4 changed files with 53 additions and 22 deletions

View file

@ -39,12 +39,10 @@ static void scene_xdg_surface_update_position(
wlr_scene_node_set_position(&scene_xdg_surface->surface_tree->node,
-geo.x, -geo.y);
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
struct wlr_xdg_popup *popup = xdg_surface->popup;
if (popup != NULL) {
wlr_scene_node_set_position(&scene_xdg_surface->tree->node,
popup->current.geometry.x, popup->current.geometry.y);
}
struct wlr_xdg_popup *popup = wlr_xdg_popup_try_from_wlr_xdg_surface(xdg_surface);
if (popup != NULL) {
wlr_scene_node_set_position(&scene_xdg_surface->tree->node,
popup->current.geometry.x, popup->current.geometry.y);
}
}