mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
StartWindozeCycle uses ease variable
The function StartWindozeCycle() uses now the variable WShortKey to store the shortcut key. The code is the same, but now the hasModifier variable is calculated in only one place. Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This commit is contained in:
committed by
Carlos R. Mafra
parent
e0697c9162
commit
1d09b9fdcd
@@ -81,6 +81,7 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool next, Bool class_onl
|
||||
{
|
||||
|
||||
XModifierKeymap *keymap = NULL;
|
||||
WShortKey binding;
|
||||
WSwitchPanel *swpanel = NULL;
|
||||
WScreen *scr = wScreenForRootWindow(event->xkey.root);
|
||||
KeyCode leftKey = XKeysymToKeycode(dpy, XK_Left);
|
||||
@@ -106,16 +107,17 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool next, Bool class_onl
|
||||
|
||||
if (next) {
|
||||
if (class_only)
|
||||
hasModifier = (wKeyBindings[WKBD_GROUPNEXT].modifier != 0);
|
||||
binding = wKeyBindings[WKBD_GROUPNEXT];
|
||||
else
|
||||
hasModifier = (wKeyBindings[WKBD_FOCUSNEXT].modifier != 0);
|
||||
binding = wKeyBindings[WKBD_FOCUSNEXT];
|
||||
} else {
|
||||
if (class_only)
|
||||
hasModifier = (wKeyBindings[WKBD_GROUPPREV].modifier != 0);
|
||||
binding = wKeyBindings[WKBD_GROUPPREV];
|
||||
else
|
||||
hasModifier = (wKeyBindings[WKBD_FOCUSPREV].modifier != 0);
|
||||
binding = wKeyBindings[WKBD_FOCUSPREV];
|
||||
}
|
||||
|
||||
hasModifier = (binding.modifier != 0);
|
||||
if (hasModifier) {
|
||||
keymap = XGetModifierMapping(dpy);
|
||||
XGrabKeyboard(dpy, scr->root_win, False, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||
|
||||
Reference in New Issue
Block a user