summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2013-11-05 00:55:42 +0000
committerokan <okan>2013-11-05 00:55:42 +0000
commitc1bc6d37b385ff4dad1582583fd21f2c45b2c168 (patch)
tree588c363817ae77619785133d40b74c7dc8ca237d
parentb5915eb9898b93d0f9eeb42df3f7a8a2bd839e49 (diff)
downloadcwm-c1bc6d37b385ff4dad1582583fd21f2c45b2c168.tar.gz
cwm-c1bc6d37b385ff4dad1582583fd21f2c45b2c168.tar.xz
cwm-c1bc6d37b385ff4dad1582583fd21f2c45b2c168.zip
quick keyboard focus fix for clients that neither populate wmhints nor wmprotocols, like rdesktop; focus needs to be re-visited
-rw-r--r--client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client.c b/client.c
index 74fafbc..6c9581d 100644
--- a/client.c
+++ b/client.c
@@ -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);
 		}