osd: prevent preview outlines from overlapping OSD in first output

Following code didn't consider multi-monitor setup:

  wlr_scene_node_raise_to_top(&server->menu_tree->node);
  wlr_scene_node_raise_to_top(&output->osd_tree->node);

...because when executed twice, server->menu_tree is raised above
output->osd_tree for the first output. This resulted in a scene tree like
(higher to lower):

- output->osd_tree (for 2nd output)
- output->server->osd_state.preview_outline (placed just above menu_tree)
- sever->menu_tree
- output->osd_tree (for 1st output)

So the previous outline for window switcher is placed above the OSD in the
first output.
This commit is contained in:
tokyo4j 2025-02-17 01:50:55 +09:00 committed by Johan Malm
parent bf02598098
commit fa6bffa6c6
2 changed files with 8 additions and 11 deletions

View file

@ -580,11 +580,6 @@ server_init(struct server *server)
#if HAVE_XWAYLAND
server->unmanaged_tree = wlr_scene_tree_create(&server->scene->tree);
#endif
/*
* menu_tree is moved to top in new_output_notify() when layer-shell
* layers are positioned
*/
server->menu_tree = wlr_scene_tree_create(&server->scene->tree);
workspaces_init(server);