mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
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:
commit
198b8b09ac
4 changed files with 53 additions and 22 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue