diff options
Diffstat (limited to 'sway/focus.c')
-rw-r--r-- | sway/focus.c | 6 |
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); |