From 01dddf00c894a4e03a31703360bc15892ab5b571 Mon Sep 17 00:00:00 2001 From: Alexey Voinov Date: Wed, 14 May 2008 14:04:40 +0400 Subject: [PATCH] swpanel: Consider also the release of FOCUSPREV The switch panel was not being destroyed with the realease of FOCUSPREV, only with FOCUSNEXT. Fix this. One can reproduce this bug as follows. In the "Keyboard Shortcut Preferences" of WPrefs set "Focus next window" to e.g. "Alt+Tab" and "Focus previous window" to "Ctrl+Tab". The switchpanel is not destroyed if we release "Ctrl+Tab" but it is upon releasing of "Alt+Tab". Retrieved-from: http://git.altlinux.org/people/voins/packages/?p=WindowMaker.git;a=commit;h=51c95a55c9310f499b1fdeca138106ca7bf74423 [crmafra: Commit log] --- src/cycling.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cycling.c b/src/cycling.c index df067cf9..1f3cb1f2 100644 --- a/src/cycling.c +++ b/src/cycling.c @@ -194,8 +194,11 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool next) for (i = 0; i < 8 * keymap->max_keypermod; i++) { + int mask = 1 << (i / keymap->max_keypermod); + if (keymap->modifiermap[i] == ev.xkey.keycode && - wKeyBindings[WKBD_FOCUSNEXT].modifier & 1 << (i / keymap->max_keypermod)) { + ((wKeyBindings[WKBD_FOCUSNEXT].modifier & mask) + || (wKeyBindings[WKBD_FOCUSPREV].modifier & mask))) { done = True; break; }