fix: remove_app() must detach set_title and set_app_id listeners for XDG sub-members

When remove_app() force-cleans a tab's group members (e.g. the main
toplevel's destruction cascades before a sub-member's own destroy fires),
it removed destroy/map/unmap/commit but not set_title/set_app_id.  The
freed member's listener stayed on the sub-toplevel's signal list; when
wlroots later destroyed that toplevel the non-empty listener assertion
fired.

Crash repro: foot+foot tab, run gnome-calculator in one terminal, cycle
to the main surface, Alt+Delete.  Both processes die from SIGTERM;
remove_app() frees the calculator member without detaching set_title,
and wlroots asserts on the calculator toplevel teardown.
This commit is contained in:
Andrew Hamilton 2026-08-27 09:09:30 +10:00
parent 858be2c377
commit ac9a079fe3

2
kick.c
View file

@ -2456,6 +2456,8 @@ static void remove_app(int idx) {
wl_list_remove(&sub->map.link); wl_list_remove(&sub->map.link);
wl_list_remove(&sub->unmap.link); wl_list_remove(&sub->unmap.link);
wl_list_remove(&sub->commit.link); wl_list_remove(&sub->commit.link);
wl_list_remove(&sub->set_title.link);
wl_list_remove(&sub->set_app_id.link);
} }
wl_list_remove(&sub->link); wl_list_remove(&sub->link);
free(sub); free(sub);