mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-28 05:40:11 -04:00
xwayland: fix assertion failure in wlr_xwayland_shell_v1
The issue occurred when `wlr_xwayland_shell_v1` was destroyed before `wlr_xwayland`. This happened because `wlr_xwayland` didn't remove the listener for the shell's destroy event in `handle_shell_destroy`.
This commit is contained in:
parent
462046ffdc
commit
d7ae9a866b
1 changed files with 5 additions and 0 deletions
|
|
@ -69,6 +69,11 @@ static void handle_shell_destroy(struct wl_listener *listener, void *data) {
|
|||
struct wlr_xwayland *xwayland =
|
||||
wl_container_of(listener, xwayland, shell_destroy);
|
||||
xwayland->shell_v1 = NULL;
|
||||
wl_list_remove(&xwayland->shell_destroy.link);
|
||||
// Will remove this list in handle_shell_destroy().
|
||||
// This ensures the link is always initialized and
|
||||
// avoids the need to keep check conditions in sync.
|
||||
wl_list_init(&xwayland->shell_destroy.link);
|
||||
}
|
||||
|
||||
void wlr_xwayland_destroy(struct wlr_xwayland *xwayland) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue