aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2024-01-18 10:04:51 -0500
committerKirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commit188811f80861caacd016b857b0d07f6d2d62d15a (patch)
treedc68ea00b707b25ce398c71fe1ad996f0eb820ea /sway/tree
parent5b8b505af5d5925ae9e617ee8f3c7a0f9c43409d (diff)
scene_graph: Port layer_shell
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/output.c13
-rw-r--r--sway/tree/root.c5
2 files changed, 13 insertions, 5 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c
index 64ca3d75..3c8823dc 100644
--- a/sway/tree/output.c
+++ b/sway/tree/output.c
@@ -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;
}
diff --git a/sway/tree/root.c b/sway/tree/root.c
index fbdd9a96..7c8f9ea6 100644
--- a/sway/tree/root.c
+++ b/sway/tree/root.c
@@ -47,10 +47,15 @@ struct sway_root *root_create(struct wl_display *wl_display) {
root->staging = alloc_scene_tree(&root_scene->tree, &failed);
root->layer_tree = alloc_scene_tree(&root_scene->tree, &failed);
+ root->layers.shell_background = alloc_scene_tree(root->layer_tree, &failed);
+ root->layers.shell_bottom = alloc_scene_tree(root->layer_tree, &failed);
root->layers.tiling = alloc_scene_tree(root->layer_tree, &failed);
root->layers.floating = alloc_scene_tree(root->layer_tree, &failed);
+ root->layers.shell_top = alloc_scene_tree(root->layer_tree, &failed);
root->layers.fullscreen = alloc_scene_tree(root->layer_tree, &failed);
root->layers.fullscreen_global = alloc_scene_tree(root->layer_tree, &failed);
+ root->layers.shell_overlay = alloc_scene_tree(root->layer_tree, &failed);
+ root->layers.popup = alloc_scene_tree(root->layer_tree, &failed);
root->layers.seat = alloc_scene_tree(root->layer_tree, &failed);
root->layers.session_lock = alloc_scene_tree(root->layer_tree, &failed);