diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-21 22:05:03 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-21 22:05:06 +0100 |
commit | 2c43bd2ac8cd24534c2743419454db5476ab9456 (patch) | |
tree | bb9177b7344b7f070210c2060362d9ca4ff5e803 | |
parent | 72f297fc713c55fc17a0f41614a33ad2942d0979 (diff) |
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.c | 5 |
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) { case C_WORKSPACE: if (prev) { ipc_event_workspace(prev, c, "focus"); - // update visibility of old workspace - update_visibility(prev); // if the old workspace has no children, destroy it if(prev->children->length == 0 && prev->floating->length == 0){ destroy_workspace(prev); + } else { + // update visibility of old workspace + update_visibility(prev); } } // Update visibility of newly focused workspace |