wayland: use wlr_scene_xdg_surface_create for XDG toplevels

Switch from wlr_scene_subsurface_tree_create (which only handles
wl_subsurfaces) to wlr_scene_xdg_surface_create (which also creates
scene nodes for XDG popups). This makes right-click menus, tooltips,
and dropdown menus from native Wayland clients (LibreWolf, etc.)
visible in the scene graph.
This commit is contained in:
lkn 2026-06-25 07:48:05 +02:00
parent a16797edd8
commit 140d120718
1 changed files with 2 additions and 2 deletions

View File

@ -318,8 +318,8 @@ handle_toplevel_map(struct wl_listener *listener, void *data)
if (wl_state.scene && !view->scene_node) {
struct wlr_scene_tree *_vp = wl_state.level_trees[WL_LAYER_NORMAL]
? wl_state.level_trees[WL_LAYER_NORMAL] : &wl_state.scene->tree;
view->scene_node = wlr_scene_subsurface_tree_create(
_vp, view->xdg_surface->surface);
view->scene_node = wlr_scene_xdg_surface_create(
_vp, view->xdg_surface);
if (view->scene_node) {
view_attach_scene_destroy_listener(view);
/* Deferred reparent: move client surface under its