diff options
-rw-r--r-- | sway/handlers.c | 15 |
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 { |