aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-10-16 21:07:55 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-10-16 21:08:16 -0400
commitbfe8649e90eb88a52a31cf83bc2750895fddf3f9 (patch)
treeee4cf0bf9ec9436a134c6e33ef65ff1c9912c39a
parentMerge pull request #1402 from johalun/event-codes-include-fix (diff)
downloadsway-0.15-rc2.tar.gz
sway-0.15-rc2.tar.zst
sway-0.15-rc2.zip
Fix crash closing fullscreen windows in container0.15-rc2
-rw-r--r--sway/handlers.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index d37142a9..6ccf2b11 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -554,10 +554,6 @@ static void handle_view_destroyed(wlc_handle handle) {
554 remove_view_from_scratchpad(view); 554 remove_view_from_scratchpad(view);
555 swayc_t *parent = destroy_view(view); 555 swayc_t *parent = destroy_view(view);
556 if (parent) { 556 if (parent) {
557 if (fullscreen) {
558 parent->fullscreen = NULL;
559 }
560
561 ipc_event_window(parent, "close"); 557 ipc_event_window(parent, "close");
562 558
563 // Destroy empty workspaces 559 // Destroy empty workspaces
@@ -569,6 +565,17 @@ static void handle_view_destroyed(wlc_handle handle) {
569 parent = destroy_workspace(parent); 565 parent = destroy_workspace(parent);
570 } 566 }
571 567
568 if (fullscreen) {
569 while (parent) {
570 if (parent->fullscreen) {
571 parent->fullscreen = NULL;
572 break;
573 }
574 parent = parent->parent;
575 }
576 }
577
578
572 arrange_windows(parent, -1, -1); 579 arrange_windows(parent, -1, -1);
573 } 580 }
574 } else { 581 } else {