aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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) {