summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-27 17:54:57 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-27 17:54:57 +1000
commite6829c5991cac1bd164f800c14fccd522d702783 (patch)
tree74f48c0c81cfa64bd480195bddc47ada10812cc4 /sway
parentFix memleak in container_get_box (diff)
downloadsway-e6829c5991cac1bd164f800c14fccd522d702783.tar.gz
sway-e6829c5991cac1bd164f800c14fccd522d702783.tar.zst
sway-e6829c5991cac1bd164f800c14fccd522d702783.zip
Move unsetting of view->surface into view_unmap
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/xdg_shell.c1
-rw-r--r--sway/desktop/xdg_shell_v6.c1
-rw-r--r--sway/desktop/xwayland.c2
-rw-r--r--sway/tree/view.c1
4 files changed, 1 insertions, 4 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index b6fa9525..b076d772 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -201,7 +201,6 @@ static void handle_unmap(struct wl_listener *listener, void *data) {
201 201
202 wl_list_remove(&xdg_shell_view->commit.link); 202 wl_list_remove(&xdg_shell_view->commit.link);
203 wl_list_remove(&xdg_shell_view->new_popup.link); 203 wl_list_remove(&xdg_shell_view->new_popup.link);
204 view->surface = NULL;
205} 204}
206 205
207static void handle_map(struct wl_listener *listener, void *data) { 206static void handle_map(struct wl_listener *listener, void *data) {
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 6042a806..7320e629 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -200,7 +200,6 @@ static void handle_unmap(struct wl_listener *listener, void *data) {
200 200
201 wl_list_remove(&xdg_shell_v6_view->commit.link); 201 wl_list_remove(&xdg_shell_v6_view->commit.link);
202 wl_list_remove(&xdg_shell_v6_view->new_popup.link); 202 wl_list_remove(&xdg_shell_v6_view->new_popup.link);
203 view->surface = NULL;
204} 203}
205 204
206static void handle_map(struct wl_listener *listener, void *data) { 205static void handle_map(struct wl_listener *listener, void *data) {
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 1d5dab70..854da006 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -263,7 +263,6 @@ static void handle_unmap(struct wl_listener *listener, void *data) {
263 view_unmap(view); 263 view_unmap(view);
264 264
265 wl_list_remove(&xwayland_view->commit.link); 265 wl_list_remove(&xwayland_view->commit.link);
266 view->surface = NULL;
267} 266}
268 267
269static void handle_map(struct wl_listener *listener, void *data) { 268static void handle_map(struct wl_listener *listener, void *data) {
@@ -301,7 +300,6 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
301 if (view->surface) { 300 if (view->surface) {
302 view_unmap(view); 301 view_unmap(view);
303 wl_list_remove(&xwayland_view->commit.link); 302 wl_list_remove(&xwayland_view->commit.link);
304 view->surface = NULL;
305 } 303 }
306 304
307 wl_list_remove(&xwayland_view->destroy.link); 305 wl_list_remove(&xwayland_view->destroy.link);
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 68d2a029..9f85bac0 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -555,6 +555,7 @@ void view_unmap(struct sway_view *view) {
555 struct sway_container *parent = container_destroy(view->swayc); 555 struct sway_container *parent = container_destroy(view->swayc);
556 arrange_and_commit(parent); 556 arrange_and_commit(parent);
557 } 557 }
558 view->surface = NULL;
558} 559}
559 560
560void view_update_position(struct sway_view *view, double lx, double ly) { 561void view_update_position(struct sway_view *view, double lx, double ly) {