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.

(cherry picked from commit 84b45e4157)
This commit is contained in:
tokyo4j 2026-04-12 00:23:59 +09:00 committed by Simon Zeni
parent 13bac746d6
commit d0fbe1ce56

View file

@ -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);