mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
XKB: Sanitise vmods for redirected keys
Turn two unsigned chars into one unsigned int for both vmods and the vmod mask. As a bonus, remove broken unused accessor macro for setting the vmods. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
b5f49382fe
commit
feb757f384
4 changed files with 12 additions and 25 deletions
|
|
@ -194,23 +194,10 @@ typedef struct _XkbRedirectKeyAction {
|
|||
unsigned char new_key;
|
||||
unsigned char mods_mask;
|
||||
unsigned char mods;
|
||||
/* FIXME: Make this an int. */
|
||||
unsigned char vmods_mask0;
|
||||
unsigned char vmods_mask1;
|
||||
unsigned char vmods0;
|
||||
unsigned char vmods1;
|
||||
unsigned int vmods_mask;
|
||||
unsigned int vmods;
|
||||
} XkbRedirectKeyAction;
|
||||
|
||||
#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
|
||||
((unsigned int)(a)->vmods0))
|
||||
/* FIXME: This is blatantly not setting vmods. Yeesh. */
|
||||
#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
|
||||
((a)->vmods_mask0=((m)&0xff)))
|
||||
#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
|
||||
((unsigned int)(a)->vmods_mask0))
|
||||
#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
|
||||
((a)->vmods_mask0=((m)&0xff)))
|
||||
|
||||
typedef struct _XkbDeviceBtnAction {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
|
|
|
|||
Loading…
Reference in a new issue