aboutsummaryrefslogtreecommitdiff
path: root/sway/workspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/workspace.c')
-rw-r--r--sway/workspace.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sway/workspace.c b/sway/workspace.c
index 6a68233e..01779723 100644
--- a/sway/workspace.c
+++ b/sway/workspace.c
@@ -62,11 +62,8 @@ swayc_t *workspace_find_by_name(const char* name) {
}
void workspace_switch(swayc_t *workspace) {
- if (active_workspace) {
+ if (workspace != active_workspace && active_workspace) {
sway_log(L_DEBUG, "workspace: changing from '%s' to '%s'", active_workspace->name, workspace->name);
- if (active_workspace == workspace) {
- return;
- }
uint32_t mask = 1;
// set all c_views in the old workspace to the invisible mask
container_map(active_workspace, set_mask, &mask);