[PATCH libinput 4/5] tablet: reduce event deltas to only apply to the wheel

2015-12-13 Thread Peter Hutterer
Part of the big revamp to get rid of libinput_tablet_tool_axis and replace it with a set of axis-specific APIs. Only the rel wheel has true delta events, everything else is a delta calculated by libinput based on the previous position. Since we supply that position to the callers anyway, they can

[PATCH libinput 0/5] tablet: change to an axis-specific API

2015-12-13 Thread Peter Hutterer
This patchset changes the Tablet API from an API where we have a few functions that take an axis type into one where we have an API that is specific to each axis type. The one-size-fits-all approach turned out to be too inflexible to be useful and forced a couple of special API behaviours, e.g. g

[PATCH libinput 3/5] tablet: rename libinput_tablet_tool_has_axis into an axis-specific API set

2015-12-13 Thread Peter Hutterer
Part of the big revamp to get rid of libinput_tablet_tool_axis and replace it with a set of axis-specific APIs. Note that this commit drops the ability to check whether a tablet has an x or y axis. If it doesn't, libinput won't initialize the tablet anyway so this was superfluous already. Likewis

[PATCH libinput 5/5] tablet: remove the libinput_tablet_tool_axis enum from the public API

2015-12-13 Thread Peter Hutterer
Internally we still use it, at least for now. Signed-off-by: Peter Hutterer --- src/libinput-private.h | 16 ++-- src/libinput.h | 21 - 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/libinput-private.h b/src/libinput-private.h index

[PATCH libinput 2/5] tablet: rename axis_get_value into an axis-specific API set

2015-12-13 Thread Peter Hutterer
Second part of the big revamp to get rid of libinput_tablet_tool_axis and replace it with a set of axis-specific APIs. Note that this commit drops the ability to get the absolute value from a relative wheel. The previous API always returned 0 for this case, it is not needed anymore. Signed-off-by

[PATCH libinput 1/5] tablet: rename axis_has_changed into an axis-specific API set

2015-12-13 Thread Peter Hutterer
First part of the big revamp to get rid of libinput_tablet_tool_axis and replace it with a set of axis-specific APIs. Signed-off-by: Peter Hutterer --- src/libinput.c | 128 +++-- src/libinput.h | 146 +

[PATCH v3 libinput] tablet: support tool-specific pressure offsets

2015-12-13 Thread Peter Hutterer
If a tool wears out, it may have a pre-loaded pressure offset. In that case, even when the tool is not physically in contact with the tablet surface it will send pressure events. Use automatic pressure offset detection, similar to what the X.Org wacom driver does. On proximity-in, check the pressu