From a47b4ccaab4803eba1fb0774e26abd3ed06f9fd4 Mon Sep 17 00:00:00 2001 From: oga Date: Mon, 19 May 2008 15:17:50 +0000 Subject: 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@ --- kbfunc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'kbfunc.c') diff --git a/kbfunc.c b/kbfunc.c index ef5d0da..7c98c37 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.23 2008/05/19 12:56:58 okan Exp $ + * $Id: kbfunc.c,v 1.24 2008/05/19 15:17:50 oga Exp $ */ #include @@ -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 -- cgit v1.2.3-2-gb3c3