scene_graph: Port layer_shell

This commit is contained in:
Alexander Orzechowski 2024-01-18 10:04:51 -05:00 committed by Kirill Primak
parent 5b8b505af5
commit 188811f808
9 changed files with 258 additions and 644 deletions

View file

@ -93,8 +93,12 @@ static void destroy_scene_layers(struct sway_output *output) {
scene_node_disown_children(output->layers.tiling);
scene_node_disown_children(output->layers.fullscreen);
wlr_scene_node_destroy(&output->layers.shell_background->node);
wlr_scene_node_destroy(&output->layers.shell_bottom->node);
wlr_scene_node_destroy(&output->layers.tiling->node);
wlr_scene_node_destroy(&output->layers.fullscreen->node);
wlr_scene_node_destroy(&output->layers.shell_top->node);
wlr_scene_node_destroy(&output->layers.shell_overlay->node);
wlr_scene_node_destroy(&output->layers.session_lock->node);
}
@ -103,8 +107,12 @@ struct sway_output *output_create(struct wlr_output *wlr_output) {
node_init(&output->node, N_OUTPUT, output);
bool failed = false;
output->layers.shell_background = alloc_scene_tree(root->staging, &failed);
output->layers.shell_bottom = alloc_scene_tree(root->staging, &failed);
output->layers.tiling = alloc_scene_tree(root->staging, &failed);
output->layers.fullscreen = alloc_scene_tree(root->staging, &failed);
output->layers.shell_top = alloc_scene_tree(root->staging, &failed);
output->layers.shell_overlay = alloc_scene_tree(root->staging, &failed);
output->layers.session_lock = alloc_scene_tree(root->staging, &failed);
if (!failed) {
@ -136,11 +144,6 @@ struct sway_output *output_create(struct wlr_output *wlr_output) {
output->workspaces = create_list();
output->current.workspaces = create_list();
size_t len = sizeof(output->shell_layers) / sizeof(output->shell_layers[0]);
for (size_t i = 0; i < len; ++i) {
wl_list_init(&output->shell_layers[i]);
}
return output;
}