From db2feefbee92906d7a82a938590915d4b94b7cbe Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 19 Oct 2013 00:24:54 +0000 Subject: For clients that support WM_TAKE_FOCUS in their WM_PROTOCOLS property, send a ClientMessage event. --- client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client.c') 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 @@ -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 -- cgit v1.2.3-2-gb3c3