aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/output.c4
-rw-r--r--sway/desktop/transaction.c17
-rw-r--r--sway/desktop/xdg_shell.c2
-rw-r--r--sway/desktop/xdg_shell_v6.c2
-rw-r--r--sway/desktop/xwayland.c2
5 files changed, 21 insertions, 6 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 3d8bbff5..401d3c44 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -498,7 +498,7 @@ void output_damage_whole_container(struct sway_output *output,
498static void damage_handle_destroy(struct wl_listener *listener, void *data) { 498static void damage_handle_destroy(struct wl_listener *listener, void *data) {
499 struct sway_output *output = 499 struct sway_output *output =
500 wl_container_of(listener, output, damage_destroy); 500 wl_container_of(listener, output, damage_destroy);
501 container_destroy(output->swayc); 501 output_begin_destroy(output->swayc);
502} 502}
503 503
504static void handle_destroy(struct wl_listener *listener, void *data) { 504static void handle_destroy(struct wl_listener *listener, void *data) {
@@ -506,7 +506,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
506 wl_signal_emit(&output->events.destroy, output); 506 wl_signal_emit(&output->events.destroy, output);
507 507
508 if (output->swayc) { 508 if (output->swayc) {
509 container_destroy(output->swayc); 509 output_begin_destroy(output->swayc);
510 } 510 }
511 511
512 wl_list_remove(&output->link); 512 wl_list_remove(&output->link);
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index f82e5ef2..c18529fb 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -54,7 +54,22 @@ static void transaction_destroy(struct sway_transaction *transaction) {
54 con->instruction = NULL; 54 con->instruction = NULL;
55 } 55 }
56 if (con->destroying && con->ntxnrefs == 0) { 56 if (con->destroying && con->ntxnrefs == 0) {
57 container_free(con); 57 switch (con->type) {
58 case C_ROOT:
59 break;
60 case C_OUTPUT:
61 output_destroy(con);
62 break;
63 case C_WORKSPACE:
64 workspace_destroy(con);
65 break;
66 case C_CONTAINER:
67 case C_VIEW:
68 container_destroy(con);
69 break;
70 case C_TYPES:
71 break;
72 }
58 } 73 }
59 free(instruction); 74 free(instruction);
60 } 75 }
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index aae129bd..f5aaa575 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -448,7 +448,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
448 wl_list_remove(&xdg_shell_view->map.link); 448 wl_list_remove(&xdg_shell_view->map.link);
449 wl_list_remove(&xdg_shell_view->unmap.link); 449 wl_list_remove(&xdg_shell_view->unmap.link);
450 view->wlr_xdg_surface = NULL; 450 view->wlr_xdg_surface = NULL;
451 view_destroy(view); 451 view_begin_destroy(view);
452} 452}
453 453
454struct sway_view *view_from_wlr_xdg_surface( 454struct sway_view *view_from_wlr_xdg_surface(
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 277c53a3..f623b77b 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -441,7 +441,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
441 wl_list_remove(&xdg_shell_v6_view->map.link); 441 wl_list_remove(&xdg_shell_v6_view->map.link);
442 wl_list_remove(&xdg_shell_v6_view->unmap.link); 442 wl_list_remove(&xdg_shell_v6_view->unmap.link);
443 view->wlr_xdg_surface_v6 = NULL; 443 view->wlr_xdg_surface_v6 = NULL;
444 view_destroy(view); 444 view_begin_destroy(view);
445} 445}
446 446
447struct sway_view *view_from_wlr_xdg_surface_v6( 447struct sway_view *view_from_wlr_xdg_surface_v6(
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index ce7235e4..6fcc850d 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -341,7 +341,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
341 wl_list_remove(&xwayland_view->set_hints.link); 341 wl_list_remove(&xwayland_view->set_hints.link);
342 wl_list_remove(&xwayland_view->map.link); 342 wl_list_remove(&xwayland_view->map.link);
343 wl_list_remove(&xwayland_view->unmap.link); 343 wl_list_remove(&xwayland_view->unmap.link);
344 view_destroy(&xwayland_view->view); 344 view_begin_destroy(&xwayland_view->view);
345} 345}
346 346
347static void handle_unmap(struct wl_listener *listener, void *data) { 347static void handle_unmap(struct wl_listener *listener, void *data) {