aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2013-10-19 00:24:54 +0000
committerokan2013-10-19 00:24:54 +0000
commitdb2feefbee92906d7a82a938590915d4b94b7cbe (patch)
tree947ffce4127085c9653cbbfbbc976c653f847ef1 /client.c
parentf3a33d7d0931579c31fb93a250fdaf1bc6181a2d (diff)
downloadcwm-db2feefbee92906d7a82a938590915d4b94b7cbe.tar.gz
For clients that support WM_TAKE_FOCUS in their WM_PROTOCOLS property, send
a ClientMessage event.
Diffstat (limited to '')
-rw-r--r--client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/client.c b/client.c
index 912adc4..1004390 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.137 2013/10/03 13:51:59 okan Exp $
+ * $OpenBSD: client.c,v 1.138 2013/10/19 00:24:54 okan Exp $
*/
#include <sys/param.h>
@@ -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