aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree
diff options
context:
space:
mode:
authorLibravatar Alexander Orzechowski <alex@ozal.ski>2024-01-18 10:04:51 -0500
committerLibravatar Kirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commit188811f80861caacd016b857b0d07f6d2d62d15a (patch)
treedc68ea00b707b25ce398c71fe1ad996f0eb820ea /sway/tree
parentinput: Query scene graph for relevant surface/node intersections (diff)
downloadsway-188811f80861caacd016b857b0d07f6d2d62d15a.tar.gz
sway-188811f80861caacd016b857b0d07f6d2d62d15a.tar.zst
sway-188811f80861caacd016b857b0d07f6d2d62d15a.zip
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) {
93 scene_node_disown_children(output->layers.tiling); 93 scene_node_disown_children(output->layers.tiling);
94 scene_node_disown_children(output->layers.fullscreen); 94 scene_node_disown_children(output->layers.fullscreen);
95 95
96 wlr_scene_node_destroy(&output->layers.shell_background->node);
97 wlr_scene_node_destroy(&output->layers.shell_bottom->node);
96 wlr_scene_node_destroy(&output->layers.tiling->node); 98 wlr_scene_node_destroy(&output->layers.tiling->node);
97 wlr_scene_node_destroy(&output->layers.fullscreen->node); 99 wlr_scene_node_destroy(&output->layers.fullscreen->node);
100 wlr_scene_node_destroy(&output->layers.shell_top->node);
101 wlr_scene_node_destroy(&output->layers.shell_overlay->node);
98 wlr_scene_node_destroy(&output->layers.session_lock->node); 102 wlr_scene_node_destroy(&output->layers.session_lock->node);
99} 103}
100 104
@@ -103,8 +107,12 @@ struct sway_output *output_create(struct wlr_output *wlr_output) {
103 node_init(&output->node, N_OUTPUT, output); 107 node_init(&output->node, N_OUTPUT, output);
104 108
105 bool failed = false; 109 bool failed = false;
110 output->layers.shell_background = alloc_scene_tree(root->staging, &failed);
111 output->layers.shell_bottom = alloc_scene_tree(root->staging, &failed);
106 output->layers.tiling = alloc_scene_tree(root->staging, &failed); 112 output->layers.tiling = alloc_scene_tree(root->staging, &failed);
107 output->layers.fullscreen = alloc_scene_tree(root->staging, &failed); 113 output->layers.fullscreen = alloc_scene_tree(root->staging, &failed);
114 output->layers.shell_top = alloc_scene_tree(root->staging, &failed);
115 output->layers.shell_overlay = alloc_scene_tree(root->staging, &failed);
108 output->layers.session_lock = alloc_scene_tree(root->staging, &failed); 116 output->layers.session_lock = alloc_scene_tree(root->staging, &failed);
109 117
110 if (!failed) { 118 if (!failed) {
@@ -136,11 +144,6 @@ struct sway_output *output_create(struct wlr_output *wlr_output) {
136 output->workspaces = create_list(); 144 output->workspaces = create_list();
137 output->current.workspaces = create_list(); 145 output->current.workspaces = create_list();
138 146
139 size_t len = sizeof(output->shell_layers) / sizeof(output->shell_layers[0]);
140 for (size_t i = 0; i < len; ++i) {
141 wl_list_init(&output->shell_layers[i]);
142 }
143
144 return output; 147 return output;
145} 148}
146 149
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) {
47 root->staging = alloc_scene_tree(&root_scene->tree, &failed); 47 root->staging = alloc_scene_tree(&root_scene->tree, &failed);
48 root->layer_tree = alloc_scene_tree(&root_scene->tree, &failed); 48 root->layer_tree = alloc_scene_tree(&root_scene->tree, &failed);
49 49
50 root->layers.shell_background = alloc_scene_tree(root->layer_tree, &failed);
51 root->layers.shell_bottom = alloc_scene_tree(root->layer_tree, &failed);
50 root->layers.tiling = alloc_scene_tree(root->layer_tree, &failed); 52 root->layers.tiling = alloc_scene_tree(root->layer_tree, &failed);
51 root->layers.floating = alloc_scene_tree(root->layer_tree, &failed); 53 root->layers.floating = alloc_scene_tree(root->layer_tree, &failed);
54 root->layers.shell_top = alloc_scene_tree(root->layer_tree, &failed);
52 root->layers.fullscreen = alloc_scene_tree(root->layer_tree, &failed); 55 root->layers.fullscreen = alloc_scene_tree(root->layer_tree, &failed);
53 root->layers.fullscreen_global = alloc_scene_tree(root->layer_tree, &failed); 56 root->layers.fullscreen_global = alloc_scene_tree(root->layer_tree, &failed);
57 root->layers.shell_overlay = alloc_scene_tree(root->layer_tree, &failed);
58 root->layers.popup = alloc_scene_tree(root->layer_tree, &failed);
54 root->layers.seat = alloc_scene_tree(root->layer_tree, &failed); 59 root->layers.seat = alloc_scene_tree(root->layer_tree, &failed);
55 root->layers.session_lock = alloc_scene_tree(root->layer_tree, &failed); 60 root->layers.session_lock = alloc_scene_tree(root->layer_tree, &failed);
56 61