From 281da1fba3c4cf7c09351c088ec4f5793f9ce96e Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 19 May 2008 12:56:58 +0000 Subject: 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@ --- kbfunc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'kbfunc.c') diff --git a/kbfunc.c b/kbfunc.c index be94be3..ef5d0da 100644 --- a/kbfunc.c +++ b/kbfunc.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. * - * $Id: kbfunc.c,v 1.22 2008/04/16 13:47:29 oga Exp $ + * $Id: kbfunc.c,v 1.23 2008/05/19 12:56:58 okan Exp $ */ #include @@ -429,6 +429,16 @@ kbfunc_client_nogroup(struct client_ctx *cc, void *arg) group_alltoggle(); } +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) { -- cgit v1.2.3-2-gb3c3