diff options
-rw-r--r-- | sway/desktop/xwayland.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 543c914e..0a70b680 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -176,12 +176,6 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
176 | view_damage_from(view); | 176 | view_damage_from(view); |
177 | } | 177 | } |
178 | 178 | ||
179 | static void handle_destroy(struct wl_listener *listener, void *data) { | ||
180 | struct sway_xwayland_view *xwayland_view = | ||
181 | wl_container_of(listener, xwayland_view, destroy); | ||
182 | view_destroy(&xwayland_view->view); | ||
183 | } | ||
184 | |||
185 | static void handle_unmap(struct wl_listener *listener, void *data) { | 179 | static void handle_unmap(struct wl_listener *listener, void *data) { |
186 | struct sway_xwayland_view *xwayland_view = | 180 | struct sway_xwayland_view *xwayland_view = |
187 | wl_container_of(listener, xwayland_view, unmap); | 181 | wl_container_of(listener, xwayland_view, unmap); |
@@ -205,6 +199,17 @@ static void handle_map(struct wl_listener *listener, void *data) { | |||
205 | view_map(view, xsurface->surface); | 199 | view_map(view, xsurface->surface); |
206 | } | 200 | } |
207 | 201 | ||
202 | static void handle_destroy(struct wl_listener *listener, void *data) { | ||
203 | struct sway_xwayland_view *xwayland_view = | ||
204 | wl_container_of(listener, xwayland_view, destroy); | ||
205 | struct sway_view *view = &xwayland_view->view; | ||
206 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | ||
207 | if (xsurface->mapped) { | ||
208 | handle_unmap(&xwayland_view->unmap, xsurface); | ||
209 | } | ||
210 | view_destroy(&xwayland_view->view); | ||
211 | } | ||
212 | |||
208 | static void handle_request_configure(struct wl_listener *listener, void *data) { | 213 | static void handle_request_configure(struct wl_listener *listener, void *data) { |
209 | struct sway_xwayland_view *xwayland_view = | 214 | struct sway_xwayland_view *xwayland_view = |
210 | wl_container_of(listener, xwayland_view, request_configure); | 215 | wl_container_of(listener, xwayland_view, request_configure); |