• Peter Hutterer's avatar
    dix: Add unaccelerated valuators to the ValuatorMask · 4c2f2cb4
    Peter Hutterer authored
    Allows a mask to carry both accelerated and unaccelerated motion at the same
    This is required for xf86-input-libinput where the pointer acceleration
    happens in libinput already, but parts of the server, specifically raw events
    and DGA rely on device-specific unaccelerated data.
    To ease integration add this as a second set to the ValuatorMask rather than
    extending all APIs to carry a second, possibly NULL set of valuators.
    Note that a valuator mask should only be used in either accel/unaccel or
    standard mode at any time. Switching requires either a valuator_mask_zero()
    call or unsetting all valuators one-by-one. Trying to mix the two will produce
    a warning.
    The server has a shortcut for changing a mask with the
    valuator_mask_drop_unaccelerated() call. This saves us from having to loop
    through all valuators on every event, we can just drop the bits we know we
    don't want.
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
inpututils.c 30.3 KB