diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-30 16:16:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 16:16:12 -0400 |
commit | 7e0d430a0cee8c24fd4461711f264829b0f67e2e (patch) | |
tree | d55cdd62bd7470ff67953613c25a3a9b85182f50 /sway/desktop | |
parent | Use the new map/unmap events for xwayland views (diff) | |
parent | Merge pull request #1662 from swaywm/workspace-delete-fixes (diff) | |
download | sway-7e0d430a0cee8c24fd4461711f264829b0f67e2e.tar.gz sway-7e0d430a0cee8c24fd4461711f264829b0f67e2e.tar.zst sway-7e0d430a0cee8c24fd4461711f264829b0f67e2e.zip |
Merge branch 'wlroots' into wlroots-xwayland-map
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 3 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 21 |
2 files changed, 6 insertions, 18 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 25c0cbca..01f38d16 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -83,10 +83,9 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
83 | wl_container_of(listener, sway_xdg_surface, destroy); | 83 | wl_container_of(listener, sway_xdg_surface, destroy); |
84 | wl_list_remove(&sway_xdg_surface->commit.link); | 84 | wl_list_remove(&sway_xdg_surface->commit.link); |
85 | wl_list_remove(&sway_xdg_surface->destroy.link); | 85 | wl_list_remove(&sway_xdg_surface->destroy.link); |
86 | struct sway_container *parent = container_view_destroy(sway_xdg_surface->view->swayc); | 86 | container_view_destroy(sway_xdg_surface->view->swayc); |
87 | free(sway_xdg_surface->view); | 87 | free(sway_xdg_surface->view); |
88 | free(sway_xdg_surface); | 88 | free(sway_xdg_surface); |
89 | arrange_windows(parent, -1, -1); | ||
90 | } | 89 | } |
91 | 90 | ||
92 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { | 91 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { |
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 | ||
122 | static void handle_unmap(struct wl_listener *listener, void *data) { | 117 | static 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 | } |