mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-20 06:47:19 -04:00
xdg-shell: add/use wlr_xdg_{toplevel,popup}_from_wlr_xdg_surface()
This commit is contained in:
parent
21bda78b85
commit
a0fab7b1e8
4 changed files with 53 additions and 20 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