aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-03-01 16:19:23 -0500
committerKirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commitb4d7e84d3852ea93d2aab22f5993f84a7060b950 (patch)
treeb3b3e32af7044e3af6679482a861e650e20eed62 /sway/desktop
parent2c69e19fd30c5ceac61d6af821c6c6875cd3f8b6 (diff)
desktop: Rename layers to shell_layers
This code will be deleted later, but for the time being rename it so it doesn't conflict with future properties.
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/layer_shell.c27
-rw-r--r--sway/desktop/output.c12
-rw-r--r--sway/desktop/render.c16
3 files changed, 27 insertions, 28 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index e5e7046a..6480d7ce 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -218,13 +218,13 @@ void arrange_layers(struct sway_output *output) {
&usable_area.width, &usable_area.height);
// Arrange exclusive surfaces from top->bottom
- arrange_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
+ arrange_layer(output, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
&usable_area, true);
- arrange_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
+ arrange_layer(output, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
&usable_area, true);
- arrange_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
+ arrange_layer(output, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
&usable_area, true);
- arrange_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
+ arrange_layer(output, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
&usable_area, true);
if (memcmp(&usable_area, &output->usable_area,
@@ -235,13 +235,13 @@ void arrange_layers(struct sway_output *output) {
}
// Arrange non-exclusive surfaces from top->bottom
- arrange_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
+ arrange_layer(output, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
&usable_area, false);
- arrange_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
+ arrange_layer(output, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
&usable_area, false);
- arrange_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
+ arrange_layer(output, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
&usable_area, false);
- arrange_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
+ arrange_layer(output, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
&usable_area, false);
// Find topmost keyboard interactive layer, if such a layer exists
@@ -253,9 +253,8 @@ void arrange_layers(struct sway_output *output) {
struct sway_layer_surface *layer, *topmost = NULL;
for (size_t i = 0; i < nlayers; ++i) {
wl_list_for_each_reverse(layer,
- &output->layers[layers_above_shell[i]], link) {
- if (layer->layer_surface->current.keyboard_interactive
- == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE &&
+ &output->shell_layers[layers_above_shell[i]], link) {
+ if (layer->layer_surface->current.keyboard_interactive &&
layer->layer_surface->surface->mapped) {
topmost = layer;
break;
@@ -289,7 +288,7 @@ static struct sway_layer_surface *find_mapped_layer_by_client(
// For now we'll only check the overlay layer
struct sway_layer_surface *lsurface;
wl_list_for_each(lsurface,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], link) {
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], link) {
struct wl_resource *resource = lsurface->layer_surface->resource;
if (wl_resource_get_client(resource) == client
&& lsurface->layer_surface->surface->mapped) {
@@ -343,7 +342,7 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
layer_changed = layer->layer != layer_surface->current.layer;
if (layer_changed) {
wl_list_remove(&layer->link);
- wl_list_insert(&output->layers[layer_surface->current.layer],
+ wl_list_insert(&output->shell_layers[layer_surface->current.layer],
&layer->link);
layer->layer = layer_surface->current.layer;
}
@@ -716,6 +715,6 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
sway_layer->output_destroy.notify = handle_output_destroy;
wl_signal_add(&output->events.disable, &sway_layer->output_destroy);
- wl_list_insert(&output->layers[layer_surface->pending.layer],
+ wl_list_insert(&output->shell_layers[layer_surface->pending.layer],
&sway_layer->link);
}
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 8b84da86..928c77d6 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -347,10 +347,10 @@ static void output_for_each_surface(struct sway_output *output,
#endif
} else {
output_layer_for_each_surface(output,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
iterator, user_data);
output_layer_for_each_surface(output,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
iterator, user_data);
workspace_for_each_container(workspace,
@@ -361,13 +361,13 @@ static void output_for_each_surface(struct sway_output *output,
iterator, user_data);
#endif
output_layer_for_each_surface(output,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
iterator, user_data);
}
overlay:
output_layer_for_each_surface(output,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
iterator, user_data);
output_drag_icons_for_each_surface(output, &root->drag_icons,
iterator, user_data);
@@ -399,7 +399,7 @@ struct sway_workspace *output_get_active_workspace(struct sway_output *output) {
bool output_has_opaque_overlay_layer_surface(struct sway_output *output) {
struct sway_layer_surface *sway_layer_surface;
wl_list_for_each(sway_layer_surface,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], link) {
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], link) {
struct wlr_surface *wlr_surface = sway_layer_surface->layer_surface->surface;
pixman_box32_t output_box = {
.x2 = output->width,
@@ -488,7 +488,7 @@ static bool scan_out_fullscreen_view(struct sway_output *output,
}
#endif
- if (!wl_list_empty(&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY])) {
+ if (!wl_list_empty(&output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY])) {
return false;
}
if (!wl_list_empty(&root->drag_icons)) {
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index c9a306cf..168c941b 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -1098,9 +1098,9 @@ void output_render(struct render_context *ctx) {
});
render_layer_toplevel(ctx,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
render_layer_toplevel(ctx,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);
render_workspace(ctx, workspace, workspace->current.focused);
render_floating(ctx);
@@ -1108,14 +1108,14 @@ void output_render(struct render_context *ctx) {
render_unmanaged(ctx, &root->xwayland_unmanaged);
#endif
render_layer_toplevel(ctx,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
render_layer_popups(ctx,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
render_layer_popups(ctx,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);
render_layer_popups(ctx,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
}
render_seatops(ctx);
@@ -1128,9 +1128,9 @@ void output_render(struct render_context *ctx) {
render_overlay:
render_layer_toplevel(ctx,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
render_layer_popups(ctx,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
+ &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
render_drag_icons(ctx, &root->drag_icons);
renderer_end: