summaryrefslogtreecommitdiff
path: root/src/sxwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sxwm.c')
-rw-r--r--src/sxwm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index 6eff793..bd13262 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -248,6 +248,8 @@ void change_workspace(int ws)
}
tile();
+
+ focused = NULL;
if (workspaces[current_ws]) {
focused = workspaces[current_ws];
Window focused_win = find_toplevel(focused->win);
@@ -255,6 +257,10 @@ void change_workspace(int ws)
if (user_config.warp_cursor) {
warp_cursor(focused);
}
+ update_borders();
+ }
+ else {
+ XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
}
long cd = current_ws;