summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-21 22:05:03 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-21 22:05:06 +0100
commit2c43bd2ac8cd24534c2743419454db5476ab9456 (patch)
treebb9177b7344b7f070210c2060362d9ca4ff5e803
parentMerge pull request #456 from gpyh/fix-config-dir (diff)
downloadsway-2c43bd2ac8cd24534c2743419454db5476ab9456.tar.gz
sway-2c43bd2ac8cd24534c2743419454db5476ab9456.tar.zst
sway-2c43bd2ac8cd24534c2743419454db5476ab9456.zip
Only update visibility if WS isn't destroyed after
No need to update visibility if the workspace will be destroyed right after.
-rw-r--r--sway/focus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/focus.c b/sway/focus.c
index cf0ee7f6..c2ded212 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -35,12 +35,13 @@ static void update_focus(swayc_t *c) {
35 case C_WORKSPACE: 35 case C_WORKSPACE:
36 if (prev) { 36 if (prev) {
37 ipc_event_workspace(prev, c, "focus"); 37 ipc_event_workspace(prev, c, "focus");
38 // update visibility of old workspace
39 update_visibility(prev);
40 38
41 // if the old workspace has no children, destroy it 39 // if the old workspace has no children, destroy it
42 if(prev->children->length == 0 && prev->floating->length == 0){ 40 if(prev->children->length == 0 && prev->floating->length == 0){
43 destroy_workspace(prev); 41 destroy_workspace(prev);
42 } else {
43 // update visibility of old workspace
44 update_visibility(prev);
44 } 45 }
45 } 46 }
46 // Update visibility of newly focused workspace 47 // Update visibility of newly focused workspace