diff options
| author | 2026-03-18 11:48:35 -0400 | |
|---|---|---|
| committer | 2026-03-18 11:48:35 -0400 | |
| commit | 1131f9c7db2de06cc14f8046f19f965fd940e7b9 (patch) | |
| tree | 3b89b8700bb651f3ab216d7258c90f097e4c9927 | |
| parent | fixed stale focused atom state on ws change (diff) | |
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | src/tilite.c | 13 |
2 files changed, 12 insertions, 4 deletions
@@ -24,8 +24,7 @@ clean: install: all mkdir -p ${PREFIX}/bin - cp -f tilite ${PREFIX}/bin/ - chmod 755 ${PREFIX}/bin/tilite + install -m 755 tilite ${PREFIX}/bin/tilite uninstall: rm -f ${PREFIX}/bin/tilite 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) { |
