fix xwayland assert crash: drop pending associate listener unconditionally
x11_pending_teardown only removed the pending's associate listener when the surface had been hooked (associated). the listener is attached unconditionally at new_surface, so an X11 window destroyed before ever associating -- VLC's short-lived probe windows do exactly that -- left it linked on events.associate, and wlroots' xwayland_surface_destroy asserted on the non-empty list, killing kick.
This commit is contained in:
parent
fd4099076c
commit
21522a1bf8
1 changed files with 7 additions and 3 deletions
10
kick.c
10
kick.c
|
|
@ -3872,10 +3872,14 @@ struct kick_x11_pending {
|
|||
static void x11_pending_teardown(struct kick_x11_pending *p) {
|
||||
wl_list_remove(&p->link);
|
||||
wl_list_remove(&p->destroy.link);
|
||||
if (p->surface_hooked) {
|
||||
wl_list_remove(&p->associate.link);
|
||||
/* The associate listener is attached unconditionally at new_surface, so
|
||||
it must be removed unconditionally here too: a window destroyed
|
||||
before ever associating a Wayland surface (VLC's short-lived
|
||||
probe windows) leaves it linked otherwise, and wlroots asserts on
|
||||
the non-empty associate list at destroy. */
|
||||
wl_list_remove(&p->associate.link);
|
||||
if (p->surface_hooked)
|
||||
wl_list_remove(&p->map.link);
|
||||
}
|
||||
free(p);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue