aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2017-10-16 21:07:55 -0400
committerFurkan Sahin <furkan-dev@proton.me>2017-10-16 21:07:55 -0400
commit538e2f34589d99e5de9182a0ceae9403c5c92cdf (patch)
treeee4cf0bf9ec9436a134c6e33ef65ff1c9912c39a
parent9325da00eb51da18c16e857bdc74410d8f7bb05e (diff)
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) {
remove_view_from_scratchpad(view);
swayc_t *parent = destroy_view(view);
if (parent) {
- if (fullscreen) {
- parent->fullscreen = NULL;
- }
-
ipc_event_window(parent, "close");
// Destroy empty workspaces
@@ -569,6 +565,17 @@ static void handle_view_destroyed(wlc_handle handle) {
parent = destroy_workspace(parent);
}
+ if (fullscreen) {
+ while (parent) {
+ if (parent->fullscreen) {
+ parent->fullscreen = NULL;
+ break;
+ }
+ parent = parent->parent;
+ }
+ }
+
+
arrange_windows(parent, -1, -1);
}
} else {