diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-30 15:47:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 15:47:53 -0400 |
commit | 7eca02301ba309fa909ba9b12cb335f8f944f1ee (patch) | |
tree | 8616074124e558fb6787be9cb3336d61663d9a86 /sway/desktop/xwayland.c | |
parent | Merge pull request #1664 from swaywm/xwayland-add-to-focused (diff) | |
parent | Fix segfault when reaping invisible workspaces (diff) | |
download | sway-7eca02301ba309fa909ba9b12cb335f8f944f1ee.tar.gz sway-7eca02301ba309fa909ba9b12cb335f8f944f1ee.tar.zst sway-7eca02301ba309fa909ba9b12cb335f8f944f1ee.zip |
Merge pull request #1662 from swaywm/workspace-delete-fixes
Fix workspace deletion edge cases
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 3e08b20e..357c8883 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -109,29 +109,17 @@ 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 | ||
122 | static void handle_unmap_notify(struct wl_listener *listener, void *data) { | 117 | static void handle_unmap_notify(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_notify); | 119 | wl_container_of(listener, sway_surface, unmap_notify); |
125 | |||
126 | wl_list_remove(&sway_surface->view->unmanaged_view_link); | 120 | wl_list_remove(&sway_surface->view->unmanaged_view_link); |
127 | wl_list_init(&sway_surface->view->unmanaged_view_link); | 121 | wl_list_init(&sway_surface->view->unmanaged_view_link); |
128 | 122 | 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; | 123 | sway_surface->view->swayc = NULL; |
136 | sway_surface->view->surface = NULL; | 124 | sway_surface->view->surface = NULL; |
137 | } | 125 | } |