commit 215787e8b28d4e52d97bdcadd4b64305c7a62ac5
parent b48cb6b0ec1320ad25fd2c0a1b5118dbe2536060
Author: David Rosca <nowrep@gmail.com>
Date: Tue, 19 Oct 2021 07:50:05 +0200
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
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
@@ -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);