summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kbfunc.c b/kbfunc.c
index 388ead7..ba1f96a 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -435,9 +435,11 @@ kbfunc_client_nogroup(struct client_ctx *cc, union arg *arg)
 void
 kbfunc_client_grouptoggle(struct client_ctx *cc, union arg *arg)
 {
-	/* XXX for stupid X apps like xpdf and gvim */
-	XGrabKeyboard(X_Dpy, cc->win, True,
-	    GrabModeAsync, GrabModeAsync, CurrentTime);
+	if (arg->i == 0) {
+		/* XXX for stupid X apps like xpdf and gvim */
+		XGrabKeyboard(X_Dpy, cc->win, True,
+		    GrabModeAsync, GrabModeAsync, CurrentTime);
+	}
 
 	group_toggle_membership_enter(cc);
 }