actions: Remove PointerDefault affect field This was always set to affect the default button, so no need for it. 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 56 57 58 59 60 61 62 63 64 65
diff --git a/src/keymap-dump.c b/src/keymap-dump.c
index 6a139a1..0a478f2 100644
--- a/src/keymap-dump.c
+++ b/src/keymap-dump.c
@@ -466,11 +466,10 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
case ACTION_TYPE_PTR_DEFAULT:
write_buf(buf, "%s%s(", prefix, type);
- if (action->dflt.affect == XkbSA_AffectDfltBtn)
- write_buf(buf, "affect=button,button=%s%d",
- (!(action->dflt.flags & ACTION_ABSOLUTE_SWITCH) &&
- action->dflt.value >= 0) ? "+" : "",
- action->dflt.value);
+ write_buf(buf, "affect=button,button=%s%d",
+ (!(action->dflt.flags & ACTION_ABSOLUTE_SWITCH) &&
+ action->dflt.value >= 0) ? "+" : "",
+ action->dflt.value);
write_buf(buf, ")%s", suffix);
break;
diff --git a/src/xkb-priv.h b/src/xkb-priv.h
index a36ebbe..95f1348 100644
--- a/src/xkb-priv.h
+++ b/src/xkb-priv.h
@@ -192,7 +192,6 @@ struct xkb_controls_action {
struct xkb_pointer_default_action {
enum xkb_action_type type;
enum xkb_action_flags flags;
- uint8_t affect;
int8_t value;
};
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index f5b3264..98484b0 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -87,7 +87,6 @@ NewActionsInfo(void)
/* Apply some "factory defaults". */
/* Increment default button. */
- info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.affect = XkbSA_AffectDfltBtn;
info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.flags = 0;
info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.value = 1;
@@ -558,9 +557,9 @@ HandlePtrBtn(struct xkb_keymap *keymap, union xkb_action *action,
}
static const LookupEntry ptrDflts[] = {
- { "dfltbtn", XkbSA_AffectDfltBtn },
- { "defaultbutton", XkbSA_AffectDfltBtn },
- { "button", XkbSA_AffectDfltBtn },
+ { "dfltbtn", 1 },
+ { "defaultbutton", 1 },
+ { "button", 1 },
{ NULL, 0 }
};
@@ -580,7 +579,6 @@ HandleSetPtrDflt(struct xkb_keymap *keymap, union xkb_action *action,
if (!ExprResolveEnum(keymap->ctx, value, &val, ptrDflts))
return ReportMismatch(keymap, action->type, field,
"pointer component");
- act->affect = val;
return true;
}
else if (field == ACTION_FIELD_BUTTON || field == ACTION_FIELD_VALUE) {