From 5379033e1a0de6fed6027db68fae394eece9cf44 Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 5 Nov 2013 00:55:42 +0000 Subject: quick keyboard focus fix for clients that neither populate wmhints nor wmprotocols, like rdesktop; focus needs to be re-visited --- client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client.c b/client.c index d1fce2f..20d9d6a 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.145 2013/11/02 19:13:57 okan Exp $ + * $OpenBSD: client.c,v 1.146 2013/11/05 00:55:42 okan Exp $ */ #include @@ -211,7 +211,8 @@ client_setactive(struct client_ctx *cc, int fg) if (fg) { XInstallColormap(X_Dpy, cc->colormap); - if (cc->flags & CLIENT_INPUT) { + if ((cc->flags & CLIENT_INPUT) || + ((cc->xproto & _WM_TAKE_FOCUS) == 0)) { XSetInputFocus(X_Dpy, cc->win, RevertToPointerRoot, CurrentTime); } -- cgit v1.2.3-2-gb3c3