xwayland: Clear wlr_xwayland_surface in handle_destroy

If the destroyed xwayland view is in transaction, it won't
be destroyed immediately. wlr_xwayland_surface then becomes
dangling pointer.

Closes #6605
Closes #5884
This commit is contained in:
David Rosca 2021-10-19 07:50:05 +02:00
parent db70f6496c
commit 3f93a23e8d
No known key found for this signature in database
GPG key ID: EBC3FC294452C6D8

View file

@ -436,6 +436,8 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
wl_list_remove(&xwayland_view->commit.link);
}
xwayland_view->view.wlr_xwayland_surface = NULL;
wl_list_remove(&xwayland_view->destroy.link);
wl_list_remove(&xwayland_view->request_configure.link);
wl_list_remove(&xwayland_view->request_fullscreen.link);