diff options
| -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) { |
