summaryrefslogtreecommitdiff
path: root/include/inpututils.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-05-05 14:18:54 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-05-28 15:55:30 +1000
commitaf47d5b2bbe5d256ae765c07d49f094945c58478 (patch)
treee178a1622bd99e4b817933a5ee2590dfad648260 /include/inpututils.h
parent27846c49e883a47d80a33fd2979ee4357f776ffd (diff)
dix: Add unaccelerated valuators to the ValuatorMask
Allows a mask to carry both accelerated and unaccelerated motion at the same time. 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: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> (cherry-picked from commit 4c2f2cb4c8ca1ab894a65828fdd39aea9b014f69)
Diffstat (limited to 'include/inpututils.h')
-rw-r--r--include/inpututils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/inpututils.h b/include/inpututils.h
index 53c96ba1c..4e9081563 100644
--- a/include/inpututils.h
+++ b/include/inpututils.h
@@ -36,8 +36,10 @@ extern Mask event_filters[MAXDEVICES][MAXEVENTS];
struct _ValuatorMask {
int8_t last_bit; /* highest bit set in mask */
+ int8_t has_unaccelerated;
uint8_t mask[(MAX_VALUATORS + 7) / 8];
double valuators[MAX_VALUATORS]; /* valuator data */
+ double unaccelerated[MAX_VALUATORS]; /* valuator data */
};
extern void verify_internal_event(const InternalEvent *ev);