aboutsummaryrefslogtreecommitdiffstats
path: root/sway/focus.c
diff options
context:
space:
mode:
authorLibravatar Kevin Hamacher <kevin.hamacher@rub.de>2015-12-13 18:19:24 +0100
committerLibravatar Kevin Hamacher <kevin.hamacher@rub.de>2015-12-13 18:19:24 +0100
commitd77d03ce8419f83553d322eb5dd08412a45b7bb3 (patch)
tree19bf02314f732916aeb78d422877f7706e75d82e /sway/focus.c
parentDisplay output from a command on swaybar (diff)
downloadsway-d77d03ce8419f83553d322eb5dd08412a45b7bb3.tar.gz
sway-d77d03ce8419f83553d322eb5dd08412a45b7bb3.tar.zst
sway-d77d03ce8419f83553d322eb5dd08412a45b7bb3.zip
Make destroy_workspace behave as expected
Diffstat (limited to 'sway/focus.c')
-rw-r--r--sway/focus.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/focus.c b/sway/focus.c
index 9f070866..ca56de4b 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -37,7 +37,11 @@ static void update_focus(swayc_t *c) {
37 ipc_event_workspace(prev, c); 37 ipc_event_workspace(prev, c);
38 // update visibility of old workspace 38 // update visibility of old workspace
39 update_visibility(prev); 39 update_visibility(prev);
40 destroy_workspace(prev); 40
41 // if the old workspace has no children, destroy it
42 if(prev->children->length == 0 && prev->floating->length == 0){
43 destroy_workspace(prev);
44 }
41 } 45 }
42 // Update visibility of newly focused workspace 46 // Update visibility of newly focused workspace
43 update_visibility(c); 47 update_visibility(c);