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.
This commit is contained in:
Iain Patterson authored and Carlos R. Mafra committed 2013-05-02 20:41:07 +01:00
1 parent 6fb2b13ec7
commit 8cb6a78726
1 file changed
+11 -4
+11 -4
View File
@@ -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);