From 8cb6a787264cc0adef2c82af0897ba8b8461783d Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Mon, 22 Apr 2013 13:41:46 +0100 Subject: [PATCH] Correct check for modifier in class-specific cycle. The hasModifier flag was set if the FocusNextKey or FocusPrevKey shortcuts had modifiers, depending on which shortcut was used to open the switchpanel. The switchpanel can also be opened with the GroupNextKey or GroupPrevKey shortcuts, so we should account for those when setting hasModifier. --- src/cycling.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/cycling.c b/src/cycling.c index a2168d6c..f9895545 100644 --- a/src/cycling.c +++ b/src/cycling.c @@ -105,10 +105,17 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool next, Bool class_onl if (!wwin) return; - if (next) - hasModifier = (wKeyBindings[WKBD_FOCUSNEXT].modifier != 0); - else - hasModifier = (wKeyBindings[WKBD_FOCUSPREV].modifier != 0); + if (next) { + if (class_only) + hasModifier = (wKeyBindings[WKBD_GROUPNEXT].modifier != 0); + else + hasModifier = (wKeyBindings[WKBD_FOCUSNEXT].modifier != 0); + } else { + if (class_only) + hasModifier = (wKeyBindings[WKBD_GROUPPREV].modifier != 0); + else + hasModifier = (wKeyBindings[WKBD_FOCUSPREV].modifier != 0); + } if (hasModifier) { keymap = XGetModifierMapping(dpy);