From 91c34f708bd2b22ab3153e1e36583fce3f223e44 Mon Sep 17 00:00:00 2001 From: Pierre Le Marre Date: Fri, 24 Oct 2025 06:02:35 +0200 Subject: [PATCH] xkb: Fix endianness of the vmods encoding in XkbRedirectKeyAction Fixed erroneous little-endian encoding. Signed-off-by: Pierre Le Marre --- include/X11/extensions/XKBstr.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/X11/extensions/XKBstr.h b/include/X11/extensions/XKBstr.h index eaefae8..b5256a8 100644 --- a/include/X11/extensions/XKBstr.h +++ b/include/X11/extensions/XKBstr.h @@ -221,14 +221,14 @@ typedef struct _XkbRedirectKeyAction { unsigned char vmods1; } XkbRedirectKeyAction; -#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ - ((unsigned int)(a)->vmods0)) -#define XkbSARedirectSetVMods(a,m) (((a)->vmods1=(((m)>>8)&0xff)),\ - ((a)->vmods0=((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))) +#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods0)<<8)|\ + ((unsigned int)(a)->vmods1)) +#define XkbSARedirectSetVMods(a,m) (((a)->vmods0=(((m)>>8)&0xff)),\ + ((a)->vmods1=((m)&0xff))) +#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask0)<<8)|\ + ((unsigned int)(a)->vmods_mask1)) +#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask0=(((m)>>8)&0xff)),\ + ((a)->vmods_mask1=((m)&0xff))) typedef struct _XkbDeviceBtnAction { unsigned char type;