summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xkbstr.h11
-rw-r--r--xkb/XKBMisc.c8
-rw-r--r--xkb/xkbUtils.c4
-rw-r--r--xkb/xkbtext.c4
-rw-r--r--xkb/xkmread.c6
5 files changed, 12 insertions, 21 deletions
diff --git a/include/xkbstr.h b/include/xkbstr.h
index 4afe010d2..c1752a30c 100644
--- a/include/xkbstr.h
+++ b/include/xkbstr.h
@@ -123,14 +123,8 @@ typedef struct _XkbModAction {
unsigned char flags;
unsigned char mask;
unsigned char real_mods;
- /* FIXME: Make this an int. */
- unsigned char vmods1;
- unsigned char vmods2;
+ unsigned int vmods;
} XkbModAction;
-#define XkbModActionVMods(a) ((short) (((a)->vmods1 << 8) | (a)->vmods2))
-#define XkbSetModActionVMods(a,v) \
- ((a)->vmods1 = (((v) >> 8) & 0xff), \
- (a)->vmods2 = (v) & 0xff)
typedef struct _XkbGroupAction {
unsigned char type;
@@ -149,8 +143,7 @@ typedef struct _XkbISOAction {
/* FIXME: Make this an int. */
char group_XXX;
unsigned char affect;
- unsigned char vmods1;
- unsigned char vmods2;
+ unsigned int vmods;
} XkbISOAction;
typedef struct _XkbPtrAction {
diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c
index 078f2419c..82d37d19f 100644
--- a/xkb/XKBMisc.c
+++ b/xkb/XKBMisc.c
@@ -343,7 +343,7 @@ unsigned tmp;
case XkbSA_SetMods: case XkbSA_LatchMods: case XkbSA_LockMods:
if (act->mods.flags&XkbSA_UseModMapMods)
act->mods.real_mods= act->mods.mask= mods;
- if ((tmp= XkbModActionVMods(&act->mods))!=0) {
+ if ((tmp= act->mods.vmods)!=0) {
XkbVirtualModsToReal(xkb,tmp,&tmp);
act->mods.mask|= tmp;
}
@@ -351,7 +351,7 @@ unsigned tmp;
case XkbSA_ISOLock:
if (act->iso.flags&XkbSA_UseModMapMods)
act->iso.real_mods= act->iso.mask= mods;
- if ((tmp= XkbModActionVMods(&act->iso))!=0) {
+ if ((tmp= act->iso.vmods)!=0) {
XkbVirtualModsToReal(xkb,tmp,&tmp);
act->iso.mask|= tmp;
}
@@ -666,7 +666,7 @@ unsigned int tmp;
switch (act->type) {
case XkbSA_SetMods: case XkbSA_LatchMods: case XkbSA_LockMods:
- if (((tmp= XkbModActionVMods(&act->mods))&changed)!=0) {
+ if (((tmp= act->mods.vmods)&changed)!=0) {
XkbVirtualModsToReal(xkb,tmp,&tmp);
act->mods.mask= act->mods.real_mods;
act->mods.mask|= tmp;
@@ -674,7 +674,7 @@ unsigned int tmp;
}
break;
case XkbSA_ISOLock:
- if ((((tmp= XkbModActionVMods(&act->iso))!=0)&changed)!=0) {
+ if ((((tmp= act->iso.vmods)!=0)&changed)!=0) {
XkbVirtualModsToReal(xkb,tmp,&tmp);
act->iso.mask= act->iso.real_mods;
act->iso.mask|= tmp;
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index d03195f05..b07dceb80 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -183,13 +183,13 @@ register unsigned tmp;
case XkbSA_SetMods: case XkbSA_LatchMods: case XkbSA_LockMods:
if (act->mods.flags&XkbSA_UseModMapMods)
act->mods.real_mods= act->mods.mask= mods;
- if ((tmp= XkbModActionVMods(&act->mods))!=0)
+ if ((tmp= act->mods.vmods)!=0)
act->mods.mask|= XkbMaskForVMask(xkb,tmp);
break;
case XkbSA_ISOLock:
if (act->iso.flags&XkbSA_UseModMapMods)
act->iso.real_mods= act->iso.mask= mods;
- if ((tmp= XkbModActionVMods(&act->iso))!=0)
+ if ((tmp= act->iso.vmods)!=0)
act->iso.mask|= XkbMaskForVMask(xkb,tmp);
break;
}
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index f9bfae581..213dbb7aa 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -678,7 +678,7 @@ XkbModAction * act;
unsigned tmp;
act= &action->mods;
- tmp= XkbModActionVMods(act);
+ tmp= act->vmods;
TryCopyStr(buf,"modifiers=",sz);
if (act->flags&XkbSA_UseModMapMods)
TryCopyStr(buf,"modMapMods",sz);
@@ -818,7 +818,7 @@ char tbuf[64];
}
else {
unsigned tmp;
- tmp= XkbModActionVMods(act);
+ tmp= act->vmods;
TryCopyStr(buf,"modifiers=",sz);
if (act->flags&XkbSA_UseModMapMods)
TryCopyStr(buf,"modMapMods",sz);
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index dc6e0d252..ff0537e10 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -457,8 +457,7 @@ XkbAction *act;
act->mods.flags = wire.actionData[0];
act->mods.mask = wire.actionData[1];
act->mods.real_mods = wire.actionData[2];
- act->mods.vmods1 = wire.actionData[3];
- act->mods.vmods2 = wire.actionData[4];
+ act->mods.vmods = (wire.actionData[3] << 8) | wire.actionData[4];
break;
case XkbSA_SetGroup:
case XkbSA_LatchGroup:
@@ -497,8 +496,7 @@ XkbAction *act;
act->iso.real_mods = wire.actionData[2];
act->iso.group_XXX = wire.actionData[3];
act->iso.affect = wire.actionData[4];
- act->iso.vmods1 = wire.actionData[5];
- act->iso.vmods2 = wire.actionData[6];
+ act->iso.vmods = (wire.actionData[5] << 8) | wire.actionData[6];
break;
case XkbSA_SwitchScreen:
act->screen.flags = wire.actionData[0];