It's easier to deal with, but we need to set it as "factory default".
Signed-off-by: Ran Benita <ran234@gmail.com>
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),
};
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)
/* 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;
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);
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;