summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoruint23 <[email protected]>2025-04-29 18:02:11 +0100
committeruint23 <[email protected]>2025-04-29 18:02:11 +0100
commit31e322b52f88e0f803ed4ac4d21c44662d68b3ea (patch)
tree073787825fac2170d0831d7a28f64ed5d1c073c3 /src
parent102b0f5df75a996a1a7ae0d3bbfa4e9c9b3b793a (diff)
fix window unmapping issue when changing workspace
Diffstat (limited to 'src')
-rw-r--r--src/sxwm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index ecde1c1..1e2ab6e 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -1413,21 +1413,23 @@ void change_workspace(int ws)
if (ws >= NUM_WORKSPACES || ws == current_ws) {
return;
}
+
+ for (Client *c = workspaces[current_ws]; c; c = c->next) {
+ XUnmapWindow(dpy, c->win);
+ }
+
current_ws = ws;
- /* map new desktop */
for (Client *c = workspaces[current_ws]; c; c = c->next) {
XMapWindow(dpy, c->win);
}
- /* retile & refocus */
tile();
if (workspaces[current_ws]) {
focused = workspaces[current_ws];
XSetInputFocus(dpy, focused->win, RevertToPointerRoot, CurrentTime);
}
- /* update atom */
long cd = current_ws;
XChangeProperty(dpy, root, XInternAtom(dpy, "_NET_CURRENT_DESKTOP", False), XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)&cd, 1);