diff options
author | Tony Crisci <[email protected]> | 2018-03-30 16:16:12 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2018-03-30 16:16:12 -0400 |
commit | 7e0d430a0cee8c24fd4461711f264829b0f67e2e (patch) | |
tree | d55cdd62bd7470ff67953613c25a3a9b85182f50 /sway/desktop/xwayland.c | |
parent | cf09ea184b891594331240eb860f28975dcb8b8c (diff) | |
parent | 7eca02301ba309fa909ba9b12cb335f8f944f1ee (diff) |
Merge branch 'wlroots' into wlroots-xwayland-map
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 13eaf79a..dfc54e86 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -109,29 +109,18 @@ static void handle_destroy(struct wl_listener *listener, void *data) { wl_list_remove(&sway_surface->destroy.link); wl_list_remove(&sway_surface->request_configure.link); wl_list_remove(&sway_surface->view->unmanaged_view_link); - - struct sway_container *parent = container_view_destroy(sway_surface->view->swayc); - if (parent) { - arrange_windows(parent, -1, -1); - } - - free(sway_surface->view); - free(sway_surface); + container_view_destroy(sway_surface->view->swayc); + sway_surface->view->swayc = NULL; + sway_surface->view->surface = NULL; } static void handle_unmap(struct wl_listener *listener, void *data) { struct sway_xwayland_surface *sway_surface = wl_container_of(listener, sway_surface, unmap); - + wl_list_remove(&sway_surface->view->unmanaged_view_link); wl_list_init(&sway_surface->view->unmanaged_view_link); - - // take it out of the tree - struct sway_container *parent = container_view_destroy(sway_surface->view->swayc); - if (parent) { - arrange_windows(parent, -1, -1); - } - + container_view_destroy(sway_surface->view->swayc); sway_surface->view->swayc = NULL; sway_surface->view->surface = NULL; } |