summaryrefslogtreecommitdiff
path: root/src/sxwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sxwm.c')
-rw-r--r--src/sxwm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index b5f5ca7..cb25702 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -382,13 +382,18 @@ void change_workspace(int ws)
}
/* if no scratchpad found focus regular window */
+ Client *cached = NULL;
if (!focused && workspaces[current_ws]) {
for (Client *c = workspaces[current_ws]; c; c = c->next) {
/* TODO TEST */
+ cached = c;
if (c->mon == current_mon) {
focused = c;
+ current_mon = c->mon;
break;
}
+ focused = cached;
+ current_mon = cached->mon;
}
}