diff options
author | oga <oga> | 2008-05-19 15:17:50 +0000 |
---|---|---|
committer | oga <oga> | 2008-05-19 15:17:50 +0000 |
commit | 43d6e147c2e0998f3e256fd2b90d85fd079429f4 (patch) | |
tree | 898746d31201c327b5ff30c322990f396c889277 /kbfunc.c | |
parent | 7957a470fd60e9d50057989595dd3b36010211e2 (diff) | |
download | cwm-43d6e147c2e0998f3e256fd2b90d85fd079429f4.tar.gz cwm-43d6e147c2e0998f3e256fd2b90d85fd079429f4.tar.xz cwm-43d6e147c2e0998f3e256fd2b90d85fd079429f4.zip |
Use the XGrabKeyboard hack in for alt-tabbing as well. This stops the
mru getting the order messed up when gvim/xpdf et all steal key events. While i'm here, change the logic in client_cyclenext() to use break instead of goto, it's nicer that way. Thirdly, instead of two different kbfuncs, just use the one and a flag. "put your cycle diff in so I can pkg_delete gvim" okan@
Diffstat (limited to 'kbfunc.c')
-rw-r--r-- | kbfunc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kbfunc.c b/kbfunc.c index a55402a..11f2262 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -176,13 +176,13 @@ kbfunc_menu_search(struct client_ctx *scratch, void *arg) void kbfunc_client_cycle(struct client_ctx *scratch, void *arg) { - client_cyclenext(0); -} + struct screen_ctx *sc = screen_current(); -void -kbfunc_client_rcycle(struct client_ctx *scratch, void *arg) -{ - client_cyclenext(1); + /* XXX for X apps that ignore events */ + XGrabKeyboard(X_Dpy, sc->rootwin, True, + GrabModeAsync, GrabModeAsync, CurrentTime); + + client_cyclenext((int)arg); } void |