diff options
-rw-r--r-- | sway/desktop/xdg_shell.c | 4 | ||||
-rw-r--r-- | sway/xdg_decoration.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index ce6fe41a..c84ca111 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "sway/tree/container.h" | 17 | #include "sway/tree/container.h" |
18 | #include "sway/tree/view.h" | 18 | #include "sway/tree/view.h" |
19 | #include "sway/tree/workspace.h" | 19 | #include "sway/tree/workspace.h" |
20 | #include "sway/xdg_decoration.h" | ||
20 | 21 | ||
21 | static const struct sway_view_child_impl popup_impl; | 22 | static const struct sway_view_child_impl popup_impl; |
22 | 23 | ||
@@ -461,6 +462,9 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
461 | wl_list_remove(&xdg_shell_view->map.link); | 462 | wl_list_remove(&xdg_shell_view->map.link); |
462 | wl_list_remove(&xdg_shell_view->unmap.link); | 463 | wl_list_remove(&xdg_shell_view->unmap.link); |
463 | view->wlr_xdg_surface = NULL; | 464 | view->wlr_xdg_surface = NULL; |
465 | if (view->xdg_decoration) { | ||
466 | view->xdg_decoration->view = NULL; | ||
467 | } | ||
464 | view_begin_destroy(view); | 468 | view_begin_destroy(view); |
465 | } | 469 | } |
466 | 470 | ||
diff --git a/sway/xdg_decoration.c b/sway/xdg_decoration.c index 39e0df56..9ac87191 100644 --- a/sway/xdg_decoration.c +++ b/sway/xdg_decoration.c | |||
@@ -10,7 +10,9 @@ static void xdg_decoration_handle_destroy(struct wl_listener *listener, | |||
10 | void *data) { | 10 | void *data) { |
11 | struct sway_xdg_decoration *deco = | 11 | struct sway_xdg_decoration *deco = |
12 | wl_container_of(listener, deco, destroy); | 12 | wl_container_of(listener, deco, destroy); |
13 | deco->view->xdg_decoration = NULL; | 13 | if(deco->view) { |
14 | deco->view->xdg_decoration = NULL; | ||
15 | } | ||
14 | wl_list_remove(&deco->destroy.link); | 16 | wl_list_remove(&deco->destroy.link); |
15 | wl_list_remove(&deco->request_mode.link); | 17 | wl_list_remove(&deco->request_mode.link); |
16 | wl_list_remove(&deco->link); | 18 | wl_list_remove(&deco->link); |