}
}
- if (!ExprResolveVModMask(keymap, value, mods_rtrn))
+ if (!ExprResolveModMask(keymap, value, MOD_BOTH, mods_rtrn))
return ReportMismatch(keymap, action,
ACTION_FIELD_MODIFIERS, "modifier mask");
return false;
}
- act->type = (uint8_t) type;
+ /*
+ * It's possible for someone to write something like this:
+ * actions = [ Private(type=3,data[0]=1,data[1]=3,data[2]=3) ]
+ * where the type refers to some existing action type, e.g. LockMods.
+ * This assumes that this action's struct is layed out in memory
+ * exactly as described in the XKB specification and libraries.
+ * We, however, have changed these structs in various ways, so this
+ * assumption is no longer true. Since this is a lousy "feature", we
+ * make actions like these no-ops for now.
+ */
+ if (type < ACTION_TYPE_PRIVATE) {
+ log_info(keymap->ctx,
+ "Private actions of type %s are not supported; Ignored\n",
+ ActionTypeText(type));
+ act->type = ACTION_TYPE_NONE;
+ }
+ else {
+ act->type = (enum xkb_action_type) type;
+ }
+
return true;
}
else if (field == ACTION_FIELD_DATA) {
{
ExprDef *arg;
const char *str;
- unsigned hndlrType;
+ unsigned handler_type;
if (def->op != EXPR_ACTION_DECL) {
log_err(keymap->ctx, "Expected an action definition, found %s\n",
}
str = xkb_atom_text(keymap->ctx, def->value.action.name);
- if (!stringToAction(str, &hndlrType)) {
+ if (!stringToAction(str, &handler_type)) {
log_err(keymap->ctx, "Unknown action %s\n", str);
return false;
}
* statements such as:
* latchMods.clearLocks = True;
*/
- *action = info->actions[hndlrType];
+ *action = info->actions[handler_type];
/*
* Now change the action properties as specified for this
return false;
}
- if (!handleAction[hndlrType](keymap, action, fieldNdx, arrayRtrn,
- value))
+ if (!handleAction[handler_type](keymap, action, fieldNdx, arrayRtrn,
+ value))
return false;
}