nsxiv4396031
switch back to whitelisting modifers (#150)
* Revert "Allow any set of modifiers to be used in keybindings" this keeps things equal with sxiv while giving users possibility to customize USED_MODMASK if they wish. This reverts commit 3234b0e521cca006a94cb135a88d146122d7f66d. Closes: https://github.com/nsxiv/nsxiv/issues/149 Closes: https://github.com/nsxiv/nsxiv/issues/123
+4 −4
2 files changed
- M config.def.h +3 −3
- M main.c +1 −1
| @@ -42,7 +42,7 @@ static const int SLIDESHOW_DELAY = 5; | |||
| 42 | 42 | ||
| 43 | 43 | /* gamma correction: the user-visible ranges [-GAMMA_RANGE, 0] and | |
| 44 | 44 | * (0, GAMMA_RANGE] are mapped to the ranges [0, 1], and (1, GAMMA_MAX]. | |
| 45 | − | * */ | |
| 45 | + | */ | |
| 46 | 46 | static const double GAMMA_MAX = 10.0; | |
| 47 | 47 | static const int GAMMA_RANGE = 32; | |
| 48 | 48 | ||
| @@ -71,8 +71,8 @@ static const int THUMB_SIZE = 3; | |||
| 71 | 71 | #endif | |
| 72 | 72 | #ifdef _MAPPINGS_CONFIG | |
| 73 | 73 | ||
| 74 | − | /* following modifiers (NumLock | CapsLock) will be ignored when processing keybindings */ | |
| 75 | − | static const int ignore_mask = Mod2Mask | LockMask; | |
| 74 | + | /* these modifiers will be used when processing keybindings */ | |
| 75 | + | static const unsigned int USED_MODMASK = ShiftMask | ControlMask | Mod1Mask; | |
| 76 | 76 | ||
| 77 | 77 | /* abort the keyhandler */ | |
| 78 | 78 | static const KeySym KEYHANDLER_ABORT = XK_Escape; | |
| @@ -36,7 +36,7 @@ | |||
| 36 | 36 | #include <X11/keysym.h> | |
| 37 | 37 | #include <X11/XF86keysym.h> | |
| 38 | 38 | ||
| 39 | − | #define MODMASK(mask) ((mask) & ~ignore_mask) | |
| 39 | + | #define MODMASK(mask) ((mask) & USED_MODMASK) | |
| 40 | 40 | #define BAR_SEP " " | |
| 41 | 41 | ||
| 42 | 42 | typedef struct { | |