summaryrefslogtreecommitdiff
path: root/src/sxwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sxwm.c')
-rw-r--r--src/sxwm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index d2ade15..dd779df 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -203,6 +203,8 @@ void change_workspace(int ws)
return;
}
+ XGrabServer(dpy);
+
for (Client *c = workspaces[current_ws]; c; c = c->next) {
XUnmapWindow(dpy, c->win);
}
@@ -221,6 +223,8 @@ void change_workspace(int ws)
long cd = current_ws;
XChangeProperty(dpy, root, XInternAtom(dpy, "_NET_CURRENT_DESKTOP", False), XA_CARDINAL, 32, PropModeReplace,
(unsigned char *)&cd, 1);
+
+ XUngrabServer(dpy);
}
int clean_mask(int mask)