diff options
author | uint23 <[email protected]> | 2025-04-29 18:02:11 +0100 |
---|---|---|
committer | uint23 <[email protected]> | 2025-04-29 18:02:11 +0100 |
commit | 31e322b52f88e0f803ed4ac4d21c44662d68b3ea (patch) | |
tree | 073787825fac2170d0831d7a28f64ed5d1c073c3 /src | |
parent | 102b0f5df75a996a1a7ae0d3bbfa4e9c9b3b793a (diff) |
fix window unmapping issue when changing workspace
Diffstat (limited to 'src')
-rw-r--r-- | src/sxwm.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |