summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-10-19 07:50:05 +0200
committerFurkan Sahin <furkan-dev@proton.me>2021-10-19 07:50:05 +0200
commit8356a299a4d3ada3af39061b4592d828280ef95f (patch)
tree438ae449fd70527e29a698d9343d66ccd17807da
parentff20ed96b0b0eda2954ca91dc8f6fa9517e68dac (diff)
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
-rw-r--r--sway/desktop/xwayland.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 1af8d248..40288f97 100644
--- 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);