summaryrefslogtreecommitdiff
path: root/app/cwm/client.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2013-11-05 00:55:43 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2013-11-05 00:55:43 +0000
commit29ab4ccf1e48c9902e655b0ada7f8ad871b4b5bc (patch)
tree0049079fd01a773bf6673c5a2dce8b781186f88a /app/cwm/client.c
parent319800cbacc9b93449328df4b5aa8efb0e71520e (diff)
quick keyboard focus fix for clients that neither populate wmhints nor wmprotocols, like rdesktop; focus needs to be re-visited
Diffstat (limited to 'app/cwm/client.c')
-rw-r--r--app/cwm/client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c
index d1fce2fd5..20d9d6abe 100644
--- a/app/cwm/client.c
+++ b/app/cwm/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 <sys/param.h>
@@ -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);
}