Convert interp action from xkb_any_action to xkb_action Signed-off-by: Daniel Stone <daniel@fooishbar.org>
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
diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index d023b14..2092680 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -231,9 +231,9 @@ struct xkb_sym_interpret {
xkb_keysym_t sym;
unsigned char flags;
unsigned char match;
- uint8_t mods; /* XXX real or virt? */
+ uint8_t mods;
uint32_t virtual_mod;
- struct xkb_any_action act;
+ union xkb_action act;
};
struct xkb_compat_map {
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index fa59897..5483cd7 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -117,10 +117,8 @@ InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
info->dflt.interp.flags = 0;
info->dflt.interp.virtual_mod = XkbNoModifier;
info->dflt.interp.act.type = XkbSA_NoAction;
- for (i = 0; i < sizeof info->dflt.interp.act.data; i++)
- {
- info->dflt.interp.act.data[i] = 0;
- }
+ for (i = 0; i < sizeof(info->dflt.interp.act.any.data); i++)
+ info->dflt.interp.act.any.data[i] = 0;
ClearIndicatorMapInfo(&info->ledDflt);
info->ledDflt.defs.fileID = info->fileID;
info->ledDflt.defs.defined = 0;
@@ -144,10 +142,8 @@ ClearCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
info->dflt.interp.flags = 0;
info->dflt.interp.virtual_mod = XkbNoModifier;
info->dflt.interp.act.type = XkbSA_NoAction;
- for (i = 0; i < sizeof info->dflt.interp.act.data; i++)
- {
- info->dflt.interp.act.data[i] = 0;
- }
+ for (i = 0; i < sizeof(info->dflt.interp.act.any.data); i++)
+ info->dflt.interp.act.any.data[i] = 0;
ClearIndicatorMapInfo(&info->ledDflt);
info->nInterps = 0;
info->interps = (SymInterpInfo *) ClearCommonInfo(&info->interps->defs);
@@ -509,7 +505,7 @@ SetInterpField(SymInterpInfo * si,
{
if (arrayNdx != NULL)
return ReportSINotArray(si, field, info);
- ok = HandleActionDef(value, xkb, &si->interp.act, si->defs.merge,
+ ok = HandleActionDef(value, xkb, &si->interp.act.any, si->defs.merge,
info->act);
if (ok)
si->defs.defined |= _SI_Action;