summaryrefslogtreecommitdiff
path: root/src/sxwm.c
diff options
context:
space:
mode:
authorB. Bergeron <[email protected]>2025-05-16 13:04:20 -0400
committerB. Bergeron <[email protected]>2025-05-16 13:04:20 -0400
commit78680da40e51fe55ece11c0d186da3d7fb97150e (patch)
treef4648a21f43954975465a43bce3143a3ab2959d2 /src/sxwm.c
parent41c3fa9e7c229d1ae46d503c2a9b19496ece6563 (diff)
Remove flickering when changing between workspaces
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 6fce79d..bae0e58 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)