aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar David Rosca <nowrep@gmail.com>2021-10-19 07:50:05 +0200
committerLibravatar Kirill Primak <vyivel@posteo.net>2021-10-19 10:42:19 +0300
commit215787e8b28d4e52d97bdcadd4b64305c7a62ac5 (patch)
tree438ae449fd70527e29a698d9343d66ccd17807da
parentRemove --my-next-gpu-wont-be-nvidia (diff)
downloadsway-215787e8b28d4e52d97bdcadd4b64305c7a62ac5.tar.gz
sway-215787e8b28d4e52d97bdcadd4b64305c7a62ac5.tar.zst
sway-215787e8b28d4e52d97bdcadd4b64305c7a62ac5.zip
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) {
436 wl_list_remove(&xwayland_view->commit.link); 436 wl_list_remove(&xwayland_view->commit.link);
437 } 437 }
438 438
439 xwayland_view->view.wlr_xwayland_surface = NULL;
440
439 wl_list_remove(&xwayland_view->destroy.link); 441 wl_list_remove(&xwayland_view->destroy.link);
440 wl_list_remove(&xwayland_view->request_configure.link); 442 wl_list_remove(&xwayland_view->request_configure.link);
441 wl_list_remove(&xwayland_view->request_fullscreen.link); 443 wl_list_remove(&xwayland_view->request_fullscreen.link);