about summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2013-10-19 00:24:54 +0000
committerokan <okan>2013-10-19 00:24:54 +0000
commita70b2d81af54121eb080d7e9f149b892f78a0b67 (patch)
treeb67f26d64f7e6d0c2a4370cc6969c4fdda5162b2
parenta88b8c1363bfcb9ddaf1311f6d1e43021a5ce180 (diff)
downloadcwm-a70b2d81af54121eb080d7e9f149b892f78a0b67.tar.gz
cwm-a70b2d81af54121eb080d7e9f149b892f78a0b67.tar.xz
cwm-a70b2d81af54121eb080d7e9f149b892f78a0b67.zip
For clients that support WM_TAKE_FOCUS in their WM_PROTOCOLS property, send
a ClientMessage event.
-rw-r--r--client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client.c b/client.c
index ee069c5..d1d6877 100644
--- a/client.c
+++ b/client.c
@@ -213,6 +213,8 @@ client_setactive(struct client_ctx *cc, int fg)
 		XInstallColormap(X_Dpy, cc->colormap);
 		XSetInputFocus(X_Dpy, cc->win,
 		    RevertToPointerRoot, CurrentTime);
+		if (cc->xproto & _WM_TAKE_FOCUS)
+			client_msg(cc, cwmh[WM_TAKE_FOCUS]);
 		conf_grab_mouse(cc->win);
 		/*
 		 * If we're in the middle of alt-tabbing, don't change