From e9e65c549ad914a3e05c4eefcad6fcd88b874f5a Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Thu, 6 Sep 2018 16:04:38 +0200 Subject: [PATCH] rootston: Keep older anchored layers near anchor points Layer surfaces are attached to edges of the screen starting with the youngest, causing new ones to always displace existing ones. This changes the order to oldest first, keeping the positions more often. --- rootston/layer_shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootston/layer_shell.c b/rootston/layer_shell.c index 4ce4c293..39054079 100644 --- a/rootston/layer_shell.c +++ b/rootston/layer_shell.c @@ -110,7 +110,7 @@ static void arrange_layer(struct wlr_output *output, struct wlr_box full_area = { 0 }; wlr_output_effective_resolution(output, &full_area.width, &full_area.height); - wl_list_for_each(roots_surface, list, link) { + wl_list_for_each_reverse(roots_surface, list, link) { struct wlr_layer_surface *layer = roots_surface->layer_surface; struct wlr_layer_surface_state *state = &layer->current; if (exclusive != (state->exclusive_zone > 0)) {