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.
This commit is contained in:
tokyo4j 2026-04-12 00:23:59 +09:00
parent 35c35530a3
commit 84b45e4157

View file

@ -530,7 +530,7 @@ wlr_foreign_toplevel_handle_v1_create(
return NULL; return NULL;
} }
wl_list_insert(&manager->toplevels, &toplevel->link); wl_list_insert(manager->toplevels.prev, &toplevel->link);
toplevel->manager = manager; toplevel->manager = manager;
wl_list_init(&toplevel->resources); wl_list_init(&toplevel->resources);