summaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-30 16:16:12 -0400
committerLibravatar GitHub <noreply@github.com>2018-03-30 16:16:12 -0400
commit7e0d430a0cee8c24fd4461711f264829b0f67e2e (patch)
treed55cdd62bd7470ff67953613c25a3a9b85182f50 /sway/desktop/xwayland.c
parentUse the new map/unmap events for xwayland views (diff)
parentMerge pull request #1662 from swaywm/workspace-delete-fixes (diff)
downloadsway-7e0d430a0cee8c24fd4461711f264829b0f67e2e.tar.gz
sway-7e0d430a0cee8c24fd4461711f264829b0f67e2e.tar.zst
sway-7e0d430a0cee8c24fd4461711f264829b0f67e2e.zip
Merge branch 'wlroots' into wlroots-xwayland-map
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c21
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) {
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 wl_list_remove(&sway_surface->view->unmanaged_view_link); 111 wl_list_remove(&sway_surface->view->unmanaged_view_link);
112 112 container_view_destroy(sway_surface->view->swayc);
113 struct sway_container *parent = container_view_destroy(sway_surface->view->swayc); 113 sway_surface->view->swayc = NULL;
114 if (parent) { 114 sway_surface->view->surface = NULL;
115 arrange_windows(parent, -1, -1);
116 }
117
118 free(sway_surface->view);
119 free(sway_surface);
120} 115}
121 116
122static void handle_unmap(struct wl_listener *listener, void *data) { 117static void handle_unmap(struct wl_listener *listener, void *data) {
123 struct sway_xwayland_surface *sway_surface = 118 struct sway_xwayland_surface *sway_surface =
124 wl_container_of(listener, sway_surface, unmap); 119 wl_container_of(listener, sway_surface, unmap);
125 120
126 wl_list_remove(&sway_surface->view->unmanaged_view_link); 121 wl_list_remove(&sway_surface->view->unmanaged_view_link);
127 wl_list_init(&sway_surface->view->unmanaged_view_link); 122 wl_list_init(&sway_surface->view->unmanaged_view_link);
128 123 container_view_destroy(sway_surface->view->swayc);
129 // take it out of the tree
130 struct sway_container *parent = container_view_destroy(sway_surface->view->swayc);
131 if (parent) {
132 arrange_windows(parent, -1, -1);
133 }
134
135 sway_surface->view->swayc = NULL; 124 sway_surface->view->swayc = NULL;
136 sway_surface->view->surface = NULL; 125 sway_surface->view->surface = NULL;
137} 126}