From 1131f9c7db2de06cc14f8046f19f965fd940e7b9 Mon Sep 17 00:00:00 2001 From: lancebord Date: Wed, 18 Mar 2026 11:48:35 -0400 Subject: fixed notification issue on workspace unmapped windows --- src/tilite.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3-59-g8ed1b