dotfiles/pkgs/sway/0001-mobile-reverse-layer-order.patch

27 lines
1 KiB
Diff

From 7fead3cd2158fe913775ede5651291cf5f4ccf4d Mon Sep 17 00:00:00 2001
From: chayleaf <chayleaf-git@pavluk.org>
Date: Wed, 14 Aug 2024 07:32:11 +0700
Subject: [PATCH 1/2] mobile: reverse layer order
This makes exclusive anchored layers that were added first be first
---
sway/desktop/layer_shell.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index 8c6cedfe..41a638ee 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -129,7 +129,7 @@ static void arrange_layer(struct sway_output *output, struct wl_list *list,
struct wlr_box full_area = { 0 };
wlr_output_effective_resolution(output->wlr_output,
&full_area.width, &full_area.height);
- wl_list_for_each(sway_layer, list, link) {
+ wl_list_for_each_reverse(sway_layer, list, link) {
struct wlr_layer_surface_v1 *layer = sway_layer->layer_surface;
struct wlr_layer_surface_v1_state *state = &layer->current;
if (exclusive != (state->exclusive_zone > 0)) {
--
2.44.1