From 84b45e41578164d1a47bde85ac6a5da3b63f5685 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Sun, 12 Apr 2026 00:23:59 +0900 Subject: [PATCH] wlr-foreign-toplevel-management: add new toplevels to end of list Prior to this patch, when the client binds the manager, the existing toplevel handles were notified in the opposite order of their creation, as wl_list_insert() adds a new handle to the head of the list and wl_list_for_each() iterates from head to tail. --- types/wlr_foreign_toplevel_management_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/wlr_foreign_toplevel_management_v1.c b/types/wlr_foreign_toplevel_management_v1.c index c98457a3d..739e4c185 100644 --- a/types/wlr_foreign_toplevel_management_v1.c +++ b/types/wlr_foreign_toplevel_management_v1.c @@ -530,7 +530,7 @@ wlr_foreign_toplevel_handle_v1_create( return NULL; } - wl_list_insert(&manager->toplevels, &toplevel->link); + wl_list_insert(manager->toplevels.prev, &toplevel->link); toplevel->manager = manager; wl_list_init(&toplevel->resources);