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 3234b0e521
.
Closes: https://github.com/nsxiv/nsxiv/issues/149
Closes: https://github.com/nsxiv/nsxiv/issues/123
Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
This commit is contained in:
parent
0262988671
commit
4396031233
|
@ -42,7 +42,7 @@ static const int SLIDESHOW_DELAY = 5;
|
||||||
|
|
||||||
/* gamma correction: the user-visible ranges [-GAMMA_RANGE, 0] and
|
/* gamma correction: the user-visible ranges [-GAMMA_RANGE, 0] and
|
||||||
* (0, GAMMA_RANGE] are mapped to the ranges [0, 1], and (1, GAMMA_MAX].
|
* (0, GAMMA_RANGE] are mapped to the ranges [0, 1], and (1, GAMMA_MAX].
|
||||||
* */
|
*/
|
||||||
static const double GAMMA_MAX = 10.0;
|
static const double GAMMA_MAX = 10.0;
|
||||||
static const int GAMMA_RANGE = 32;
|
static const int GAMMA_RANGE = 32;
|
||||||
|
|
||||||
|
@ -71,8 +71,8 @@ static const int THUMB_SIZE = 3;
|
||||||
#endif
|
#endif
|
||||||
#ifdef _MAPPINGS_CONFIG
|
#ifdef _MAPPINGS_CONFIG
|
||||||
|
|
||||||
/* following modifiers (NumLock | CapsLock) will be ignored when processing keybindings */
|
/* these modifiers will be used when processing keybindings */
|
||||||
static const int ignore_mask = Mod2Mask | LockMask;
|
static const unsigned int USED_MODMASK = ShiftMask | ControlMask | Mod1Mask;
|
||||||
|
|
||||||
/* abort the keyhandler */
|
/* abort the keyhandler */
|
||||||
static const KeySym KEYHANDLER_ABORT = XK_Escape;
|
static const KeySym KEYHANDLER_ABORT = XK_Escape;
|
||||||
|
|
2
main.c
2
main.c
|
@ -36,7 +36,7 @@
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/XF86keysym.h>
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
#define MODMASK(mask) ((mask) & ~ignore_mask)
|
#define MODMASK(mask) ((mask) & USED_MODMASK)
|
||||||
#define BAR_SEP " "
|
#define BAR_SEP " "
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in New Issue