Use the right action structs We were casting the union members to the wrong action structs (from kbproto).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
diff --git a/include/X11/extensions/XKBcommon.h b/include/X11/extensions/XKBcommon.h
index 64f8e8b..31db04c 100644
--- a/include/X11/extensions/XKBcommon.h
+++ b/include/X11/extensions/XKBcommon.h
@@ -81,7 +81,7 @@ struct xkb_mod_action {
struct xkb_group_action {
unsigned char type;
unsigned char flags;
- int16_t group;
+ int16_t group_XXX;
};
struct xkb_iso_action {
@@ -124,13 +124,13 @@ struct xkb_pointer_default_action {
unsigned char type;
uint8_t flags;
uint8_t affect;
- uint8_t value;
+ uint8_t valueXXX;
};
struct xkb_switch_screen_action {
unsigned char type;
uint8_t flags;
- uint8_t screen;
+ uint8_t screenXXX;
};
struct xkb_redirect_key_action {
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index b149dfd..3ff1980 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -515,12 +515,12 @@ HandleSetLatchGroup(XkbcDescPtr xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
- XkbGroupAction *act;
+ struct xkb_group_action *act;
unsigned rtrn;
unsigned t1;
int t2;
- act = (XkbGroupAction *) action;
+ act = (struct xkb_group_action *) action;
if (array_ndx != NULL)
{
switch (field)
@@ -560,11 +560,11 @@ HandleLockGroup(XkbcDescPtr xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
- XkbGroupAction *act;
+ struct xkb_group_action *act;
unsigned t1;
int t2;
- act = (XkbGroupAction *) action;
+ act = (struct xkb_group_action *) action;
if ((array_ndx != NULL) && (field == F_Group))
return ReportActionNotArray(action->type, field);
if (field == F_Group)
@@ -714,9 +714,9 @@ HandleSetPtrDflt(XkbcDescPtr xkb,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
ExprResult rtrn;
- XkbPtrDfltAction *act;
+ struct xkb_pointer_default_action *act;
- act = (XkbPtrDfltAction *) action;
+ act = (struct xkb_pointer_default_action *) action;
if (field == F_Affect)
{
if (array_ndx != NULL)
@@ -834,9 +834,9 @@ HandleSwitchScreen(XkbcDescPtr xkb,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
ExprResult rtrn;
- XkbSwitchScreenAction *act;
+ struct xkb_switch_screen_action *act;
- act = (XkbSwitchScreenAction *) action;
+ act = (struct xkb_switch_screen_action *) action;
if (field == F_Screen)
{
ExprDef *scrn;
@@ -1087,9 +1087,9 @@ HandleDeviceBtn(XkbcDescPtr xkb,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
ExprResult rtrn;
- XkbDeviceBtnAction *act;
+ struct xkb_device_button_action *act;
- act = (XkbDeviceBtnAction *) action;
+ act = (struct xkb_device_button_action *) action;
if (field == F_Button)
{
if (array_ndx != NULL)
@@ -1158,9 +1158,9 @@ HandleDeviceValuator(XkbcDescPtr xkb,
{
#if 0
ExprResult rtrn;
- XkbDeviceValuatorAction *act;
+ struct xkb_device_valuator_action *act;
- act = (XkbDeviceValuatorAction *) action;
+ act = (struct xkb_device_valuator_action *) action;
/* XXX - Not yet implemented */
#endif
return False;
@@ -1277,7 +1277,7 @@ ApplyActionFactoryDefaults(union xkb_action * action)
{ /* increment default button */
action->dflt.affect = XkbSA_AffectDfltBtn;
action->dflt.flags = 0;
- action->dflt.value = 1;
+ action->dflt.valueXXX = 1;
}
else if (action->type == XkbSA_ISOLock)
{