summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan <okan>2015-08-27 18:40:09 +0000
committerokan <okan>2015-08-27 18:40:09 +0000
commit19826222f6dc85116145acaf8210c83c2c91dab6 (patch)
tree94826e231454e32003bc9750f381e6a2b9c568f2 /kbfunc.c
parent5391659629a7fa75b7447e824e56e179c10ca642 (diff)
downloadcwm-19826222f6dc85116145acaf8210c83c2c91dab6.tar.gz
cwm-19826222f6dc85116145acaf8210c83c2c91dab6.tar.xz
cwm-19826222f6dc85116145acaf8210c83c2c91dab6.zip
Move client cycle grab/ungrab into a more relevant place; while here,
update comments about why we need to grab/ungrab the keyboard.
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/kbfunc.c b/kbfunc.c
index 8ff230d..8d220a6 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -219,13 +219,7 @@ kbfunc_menu_group(struct client_ctx *cc, union arg *arg)
 void
 kbfunc_client_cycle(struct client_ctx *cc, union arg *arg)
 {
-	struct screen_ctx	*sc = cc->sc;
-
-	/* XXX for X apps that ignore events */
-	XGrabKeyboard(X_Dpy, sc->rootwin, True,
-	    GrabModeAsync, GrabModeAsync, CurrentTime);
-
-	client_cycle(sc, arg->i);
+	client_cycle(cc->sc, arg->i);
 }
 
 void
@@ -464,7 +458,7 @@ void
 kbfunc_client_grouptoggle(struct client_ctx *cc, union arg *arg)
 {
 	if (arg->i == 0) {
-		/* XXX for stupid X apps like xpdf and gvim */
+		/* For X apps that steal events. */
 		XGrabKeyboard(X_Dpy, cc->win, True,
 		    GrabModeAsync, GrabModeAsync, CurrentTime);
 	}