{
struct xkb_pointer_action *act = &action->ptr;
- if (array_ndx && (field == ACTION_FIELD_X || field == ACTION_FIELD_Y))
- return ReportActionNotArray(keymap, action->type, field);
-
if (field == ACTION_FIELD_X || field == ACTION_FIELD_Y) {
int val;
const bool absolute = (value->expr.op != EXPR_NEGATE &&
value->expr.op != EXPR_UNARY_PLUS);
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
if (!ExprResolveInteger(keymap->ctx, value, &val))
return ReportMismatch(keymap, action->type, field, "integer");
else if (field == ACTION_FIELD_ACCEL) {
bool set;
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
if (!ExprResolveBoolean(keymap->ctx, value, &set))
return ReportMismatch(keymap, action->type, field, "boolean");
if (field == ACTION_FIELD_TYPE) {
int type;
+ if (array_ndx)
+ return ReportActionNotArray(keymap, action->type, field);
+
if (!ExprResolveInteger(keymap->ctx, value, &type))
return ReportMismatch(keymap, ACTION_TYPE_PRIVATE, field, "integer");
return true;
}
-
bool
SetActionField(struct xkb_keymap *keymap, const char *elem, const char *field,
ExprDef *array_ndx, ExprDef *value, ActionsInfo *info)