summaryrefslogtreecommitdiffstats
path: root/sway/focus.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/focus.c')
-rw-r--r--sway/focus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/focus.c b/sway/focus.c
index 1d21ac35..0d9ee7e3 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -11,6 +11,7 @@
11 11
12bool locked_container_focus = false; 12bool locked_container_focus = false;
13bool locked_view_focus = false; 13bool locked_view_focus = false;
14bool suspend_workspace_cleanup = false;
14 15
15// switches parent focus to c. will switch it accordingly 16// switches parent focus to c. will switch it accordingly
16static void update_focus(swayc_t *c) { 17static void update_focus(swayc_t *c) {
@@ -40,7 +41,7 @@ static void update_focus(swayc_t *c) {
40 ipc_event_workspace(prev, c, "focus"); 41 ipc_event_workspace(prev, c, "focus");
41 42
42 // if the old workspace has no children, destroy it 43 // if the old workspace has no children, destroy it
43 if(prev->children->length == 0 && prev->floating->length == 0){ 44 if(prev->children->length == 0 && prev->floating->length == 0 && !suspend_workspace_cleanup) {
44 destroy_workspace(prev); 45 destroy_workspace(prev);
45 } else { 46 } else {
46 // update visibility of old workspace 47 // update visibility of old workspace