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

27 lines
1.1 KiB
Diff

From ea031ced53cd3da4e4c26bc430a5cdf018826a16 Mon Sep 17 00:00:00 2001
From: chayleaf <chayleaf-git@pavluk.org>
Date: Wed, 14 Aug 2024 07:32:11 +0700
Subject: [PATCH 2/4] 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 333c09b4..7c50af11 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -56,7 +56,7 @@ struct wlr_layer_surface_v1 *toplevel_layer_surface_from_surface(
static void arrange_surface(struct sway_output *output, const struct wlr_box *full_area,
struct wlr_box *usable_area, struct wlr_scene_tree *tree, bool exclusive) {
struct wlr_scene_node *node;
- wl_list_for_each(node, &tree->children, link) {
+ wl_list_for_each_reverse(node, &tree->children, link) {
struct sway_layer_surface *surface = scene_descriptor_try_get(node,
SWAY_SCENE_DESC_LAYER_SHELL);
// surface could be null during destruction
--
2.45.2