diff options
-rw-r--r-- | sway/desktop/xwayland.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index fd0bcaca..38ee4656 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -108,10 +108,9 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
108 | wl_list_remove(&sway_surface->commit.link); | 108 | wl_list_remove(&sway_surface->commit.link); |
109 | wl_list_remove(&sway_surface->destroy.link); | 109 | wl_list_remove(&sway_surface->destroy.link); |
110 | wl_list_remove(&sway_surface->request_configure.link); | 110 | wl_list_remove(&sway_surface->request_configure.link); |
111 | if (xsurface->override_redirect) { | 111 | if (xsurface->override_redirect && xsurface->mapped) { |
112 | if (xsurface->mapped) { | 112 | wl_list_remove(&sway_surface->view->unmanaged_view_link); |
113 | wl_list_remove(&sway_surface->view->unmanaged_view_link); | 113 | wl_list_init(&sway_surface->view->unmanaged_view_link); |
114 | } | ||
115 | } | 114 | } |
116 | 115 | ||
117 | struct sway_container *parent = container_view_destroy(sway_surface->view->swayc); | 116 | struct sway_container *parent = container_view_destroy(sway_surface->view->swayc); |
@@ -127,8 +126,9 @@ static void handle_unmap_notify(struct wl_listener *listener, void *data) { | |||
127 | struct sway_xwayland_surface *sway_surface = | 126 | struct sway_xwayland_surface *sway_surface = |
128 | wl_container_of(listener, sway_surface, unmap_notify); | 127 | wl_container_of(listener, sway_surface, unmap_notify); |
129 | struct wlr_xwayland_surface *xsurface = data; | 128 | struct wlr_xwayland_surface *xsurface = data; |
130 | if (xsurface->override_redirect) { | 129 | if (xsurface->override_redirect && xsurface->mapped) { |
131 | wl_list_remove(&sway_surface->view->unmanaged_view_link); | 130 | wl_list_remove(&sway_surface->view->unmanaged_view_link); |
131 | wl_list_init(&sway_surface->view->unmanaged_view_link); | ||
132 | } | 132 | } |
133 | 133 | ||
134 | // take it out of the tree | 134 | // take it out of the tree |