aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar lancebord 2026-03-18 11:48:35 -0400
committerGravatar lancebord 2026-03-18 11:48:35 -0400
commit1131f9c7db2de06cc14f8046f19f965fd940e7b9 (patch)
tree3b89b8700bb651f3ab216d7258c90f097e4c9927 /src
parentfixed stale focused atom state on ws change (diff)
fixed notification issue on workspace unmapped windowsHEADmain
Diffstat (limited to 'src')
-rw-r--r--src/tilite.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tilite.c b/src/tilite.c
index cd9bdb7..e880c2e 100644
--- a/src/tilite.c
+++ b/src/tilite.c
@@ -307,8 +307,17 @@ void change_workspace(int ws) {
in_ws_switch = True;
XGrabServer(dpy);
- XDeleteProperty(dpy, root, atoms[ATOM_NET_ACTIVE_WINDOW]);
- XFlush(dpy);
+ // unfocus the old workspace focused window
+ // this helps with certain apps sending notifications
+ if (focused && focused->mapped) {
+ XEvent fe = {0};
+ fe.type = FocusOut;
+ fe.xfocus.window = focused->win;
+ fe.xfocus.mode = NotifyNormal;
+ fe.xfocus.detail = NotifyNonlinear;
+ XSendEvent(dpy, focused->win, False, FocusChangeMask, &fe);
+ XFlush(dpy);
+ }
for (client_t *c = workspaces[current_ws]; c; c = c->next) {
if (c->mapped) {