summaryrefslogtreecommitdiff
path: root/xkb/xkmread.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-10 11:10:30 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-10 11:23:52 +1000
commit3711d68f657c77b947cc4670cc4eac4f62de3af8 (patch)
treee58d62b1ff84d9a69ef1ad22c6f4d070af9d2554 /xkb/xkmread.c
parent08df24555cb432eb0d90a3f63275e9485e777c4c (diff)
Revert "XKB: Sanitise * actions" commits (#19602)
Reverts the following four patches: feb757f384382c7782ceac55 "XKB: Sanitise vmods for redirected keys" b5f49382fe48f0a762d9a15f "XKB: Sanitise ctrls action" 1bd7fd195d85681e722161f8 "XKB: Sanitise pointer actions" 61c508fa78aa08ea2666fde9 "XKB: Sanitise vmods in actions" Strictly speaking, the structs used in the server are not part of the client ABI. Practically, they are as we copy from the wire straight into the structs. Changing the struct sizes breaks various wire/server conversions. Even when the structs have the same size, some internal magic causes conversions to fail. Visible by diffing the output files of: setxkbmap -layout de; xkbcomp -xkb :0 busted.xkb setxkbmap -layout de -print | xkbcomp -xkb - correct.xkb Interestingly enough, busted.xkb is the working one although the output is incorrect. Revert the four offending patches until the exact cause of this breakage can be determined. This patch restores functionality to Level3 modifiers. X.Org Bug 19602 <http://bugs.freedesktop.org/show_bug.cgi?id=19602> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb/xkmread.c')
-rw-r--r--xkb/xkmread.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 206c40382..3e0567928 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -457,7 +457,8 @@ XkbAction *act;
act->mods.flags = wire.actionData[0];
act->mods.mask = wire.actionData[1];
act->mods.real_mods = wire.actionData[2];
- act->mods.vmods = (wire.actionData[3] << 8) | wire.actionData[4];
+ act->mods.vmods1 = wire.actionData[3];
+ act->mods.vmods2 = wire.actionData[4];
break;
case XkbSA_SetGroup:
case XkbSA_LatchGroup:
@@ -467,8 +468,10 @@ XkbAction *act;
break;
case XkbSA_MovePtr:
act->ptr.flags = wire.actionData[0];
- act->ptr.x = (wire.actionData[1] << 8) | wire.actionData[2];
- act->ptr.y = (wire.actionData[3] << 8) | wire.actionData[4];
+ act->ptr.high_XXX = wire.actionData[1];
+ act->ptr.low_XXX = wire.actionData[2];
+ act->ptr.high_YYY = wire.actionData[3];
+ act->ptr.low_YYY = wire.actionData[4];
break;
case XkbSA_PtrBtn:
case XkbSA_LockPtrBtn:
@@ -494,7 +497,8 @@ XkbAction *act;
act->iso.real_mods = wire.actionData[2];
act->iso.group_XXX = wire.actionData[3];
act->iso.affect = wire.actionData[4];
- act->iso.vmods = (wire.actionData[5] << 8) | wire.actionData[6];
+ act->iso.vmods1 = wire.actionData[5];
+ act->iso.vmods2 = wire.actionData[6];
break;
case XkbSA_SwitchScreen:
act->screen.flags = wire.actionData[0];
@@ -503,19 +507,19 @@ XkbAction *act;
case XkbSA_SetControls:
case XkbSA_LockControls:
act->ctrls.flags = wire.actionData[0];
- act->ctrls.ctrls = (wire.actionData[1] << 24) | \
- (wire.actionData[2] << 16) | \
- (wire.actionData[3] << 8) | \
- wire.actionData[4];
+ act->ctrls.ctrls3 = wire.actionData[1];
+ act->ctrls.ctrls2 = wire.actionData[2];
+ act->ctrls.ctrls1 = wire.actionData[3];
+ act->ctrls.ctrls0 = wire.actionData[4];
break;
case XkbSA_RedirectKey:
act->redirect.new_key = wire.actionData[0];
act->redirect.mods_mask = wire.actionData[1];
act->redirect.mods = wire.actionData[2];
- act->redirect.vmods_mask = (wire.actionData[3] << 8) | \
- wire.actionData[4];
- act->redirect.vmods = (wire.actionData[5] << 8) | \
- wire.actionData[6];
+ act->redirect.vmods_mask0 = wire.actionData[3];
+ act->redirect.vmods_mask1 = wire.actionData[4];
+ act->redirect.vmods0 = wire.actionData[4];
+ act->redirect.vmods1 = wire.actionData[5];
break;
case XkbSA_DeviceValuator:
act->devval.device = wire.actionData[0];