about summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan <okan>2008-05-19 12:56:58 +0000
committerokan <okan>2008-05-19 12:56:58 +0000
commit7957a470fd60e9d50057989595dd3b36010211e2 (patch)
tree0a86bd03260e141244fa387e1ae54089646bb5f1 /kbfunc.c
parenta94f4bbb7a5771fd20c300893f6331aba9f4d571 (diff)
downloadcwm-7957a470fd60e9d50057989595dd3b36010211e2.tar.gz
cwm-7957a470fd60e9d50057989595dd3b36010211e2.tar.xz
cwm-7957a470fd60e9d50057989595dd3b36010211e2.zip
finally implement keyboard binding for group toggling
idea for the
    "slightly-less-abhorrent-hack-but-a-hack-nonetheless-TM" from oga@

grab and ungrab the keyboard to get around some silly X apps that like
stealing events

ok oga@
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kbfunc.c b/kbfunc.c
index a6e0da5..a55402a 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -430,6 +430,16 @@ kbfunc_client_nogroup(struct client_ctx *cc, void *arg)
 }
 
 void
+kbfunc_client_grouptoggle(struct client_ctx *cc, void *arg)
+{
+	/* XXX for stupid X apps like xpdf and gvim */
+	XGrabKeyboard(X_Dpy, cc->pwin, True,
+	    GrabModeAsync, GrabModeAsync, CurrentTime);
+
+	group_sticky_toggle_enter(cc);
+}
+
+void
 kbfunc_client_maximize(struct client_ctx *cc, void *arg)
 {
 	client_maximize(cc);