keymap: change action flag NO_ACCEL -> ACCEL
It's easier to deal with, but we need to set it as "factory default". Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
af261cb605
commit
18191702ae
|
@ -146,7 +146,7 @@ enum xkb_action_flags {
|
|||
ACTION_ABSOLUTE_SWITCH = (1 << 5),
|
||||
ACTION_ABSOLUTE_X = (1 << 6),
|
||||
ACTION_ABSOLUTE_Y = (1 << 7),
|
||||
ACTION_NO_ACCEL = (1 << 8),
|
||||
ACTION_ACCEL = (1 << 8),
|
||||
ACTION_SAME_SCREEN = (1 << 9),
|
||||
};
|
||||
|
||||
|
|
|
@ -221,8 +221,8 @@ translate_action(union xkb_action *action, const xcb_xkb_action_t *wire)
|
|||
action->ptr.x = (wire->moveptr.xLow | (wire->moveptr.xHigh << 8));
|
||||
action->ptr.y = (wire->moveptr.yLow | (wire->moveptr.yHigh << 8));
|
||||
|
||||
if (wire->moveptr.flags & XCB_XKB_SA_MOVE_PTR_FLAG_NO_ACCELERATION)
|
||||
action->ptr.flags |= ACTION_NO_ACCEL;
|
||||
if (!(wire->moveptr.flags & XCB_XKB_SA_MOVE_PTR_FLAG_NO_ACCELERATION))
|
||||
action->ptr.flags |= ACTION_ACCEL;
|
||||
if (wire->moveptr.flags & XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_X)
|
||||
action->ptr.flags |= ACTION_ABSOLUTE_X;
|
||||
if (wire->moveptr.flags & XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_Y)
|
||||
|
|
|
@ -118,6 +118,7 @@ NewActionsInfo(void)
|
|||
/* Increment default button. */
|
||||
info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.flags = 0;
|
||||
info->actions[ACTION_TYPE_PTR_DEFAULT].dflt.value = 1;
|
||||
info->actions[ACTION_TYPE_PTR_MOVE].ptr.flags = ACTION_ACCEL;
|
||||
info->actions[ACTION_TYPE_SWITCH_VT].screen.flags = ACTION_SAME_SCREEN;
|
||||
|
||||
return info;
|
||||
|
@ -466,9 +467,9 @@ HandleMovePtr(struct xkb_keymap *keymap, union xkb_action *action,
|
|||
return ReportMismatch(keymap->ctx, action->type, field, "boolean");
|
||||
|
||||
if (set)
|
||||
act->flags &= ~ACTION_NO_ACCEL;
|
||||
act->flags |= ACTION_ACCEL;
|
||||
else
|
||||
act->flags |= ACTION_NO_ACCEL;
|
||||
act->flags &= ~ACTION_ACCEL;
|
||||
}
|
||||
|
||||
return ReportIllegal(keymap->ctx, action->type, field);
|
||||
|
|
|
@ -334,13 +334,11 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
|
|||
|
||||
case ACTION_TYPE_PTR_MOVE:
|
||||
write_buf(buf, "%s%s(x=%s%d,y=%s%d%s)%s", prefix, type,
|
||||
(!(action->ptr.flags & ACTION_ABSOLUTE_X) &&
|
||||
action->ptr.x >= 0) ? "+" : "",
|
||||
(!(action->ptr.flags & ACTION_ABSOLUTE_X) && action->ptr.x >= 0) ? "+" : "",
|
||||
action->ptr.x,
|
||||
(!(action->ptr.flags & ACTION_ABSOLUTE_Y) &&
|
||||
action->ptr.y >= 0) ? "+" : "",
|
||||
(!(action->ptr.flags & ACTION_ABSOLUTE_Y) && action->ptr.y >= 0) ? "+" : "",
|
||||
action->ptr.y,
|
||||
(action->ptr.flags & ACTION_NO_ACCEL) ? ",!accel" : "",
|
||||
(action->ptr.flags & ACTION_ACCEL) ? "" : ",!accel",
|
||||
suffix);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue