[PATCH libinput] tablet: add libinput_tablet_tool_is_unique()

2015-12-20 Thread Peter Hutterer
For checking if a tablet tool can be uniquely identified by libinput. In practice this means checking for a nonzero serial number, but let's not restrict ourselves to allowing just that. Signed-off-by: Peter Hutterer --- doc/tablet-support.dox | 4 +++- src/libinput.c

Re: [libinput] A query regaring key remap functionality

2015-12-20 Thread Chris Michael
On 12/18/2015 01:20 AM, 박성진 wrote: Dear all, I have a query regarding key remap functionality. As of now, there is no key remap functionality provided by libinput. Personally, if libinput is going to "handle input" .. then it SHOULD be handling (or at least providing) API for "users" where

[PATCH libinput 6/9] tablet: store the wheel delta in the normal axes

2015-12-20 Thread Peter Hutterer
Now that we don't provide an API anymore to access the absolute value of the wheel and the axes are handled separately, we can safely store the wheel delta in the normal axis array. Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 9 -

[PATCH libinput 7/9] tablet: split out axis handling into helper functions

2015-12-20 Thread Peter Hutterer
Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 184 ++--- src/libinput-private.h | 5 ++ 2 files changed, 147 insertions(+), 42 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index

[PATCH libinput 8/9] tablet: don't mark all axes changed on init

2015-12-20 Thread Peter Hutterer
This will be set when the tool comes into proximity later. Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 5ea7f4d..af705b7 100644 --- a/src/evdev-tablet.c +++

[PATCH libinput 4/9] tablet: simplify check for testing if an axis update is needed

2015-12-20 Thread Peter Hutterer
We know when one of the bits is set we need to send an event Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index ead159e..a46a972

[PATCH libinput 3/9] tablet: unroll the tablet axis processing loop

2015-12-20 Thread Peter Hutterer
Process the axes explicitly, rather than having a loop that needs special casing for most axes anyway. And since we do the axes one-by-one, we can use the evdev axis code directly rather than the axis_to_evcode helper. Signed-off-by: Peter Hutterer ---

[PATCH libinput 1/9] tablet: dump deltas_discrete, replace with a single wheel_discrete variable

2015-12-20 Thread Peter Hutterer
Only the wheel has a discrete value, no need to keep arrays for a single value. Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 6 +++--- src/libinput-private.h | 2 +- src/libinput.c | 10 -- 3 files changed, 8 insertions(+), 10

[PATCH libinput 9/9] tablet: simplify marking axes as changed

2015-12-20 Thread Peter Hutterer
The only time we need this is on proximity in, so move it to where we handle that to have better locality. And rather than looping through and checking each bit, just memcpy the axis capabilities, because by definition they represent the set of axes that can possibly change. Signed-off-by: Peter

[PATCH libinput 5/9] tablet: simplify check for testing if an axis update is needed

2015-12-20 Thread Peter Hutterer
We know when one of the bits is set we need to send an event Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index a46a972..56ade1c 100644 ---

[PATCH libinput] tablet: invert tilt axes when left-handed is enabled

2015-12-20 Thread Peter Hutterer
Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 4 test/tablet.c | 38 ++ 2 files changed, 42 insertions(+) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index bf61411..50891e3 100644 --- a/src/evdev-tablet.c

Re: [libinput] A query regaring key remap functionality

2015-12-20 Thread Peter Hutterer
On Mon, Dec 21, 2015 at 12:27:08AM -0500, Chris Michael wrote: > On 12/18/2015 01:20 AM, 박성진 wrote: > >Dear all, > > > >I have a query regarding key remap functionality. > > > >As of now, there is no key remap functionality provided by libinput. > > > > Personally, if libinput is going to "handle

Re: [RFC v2] Add Primary Selection Protocol Version 1

2015-12-20 Thread Pekka Paalanen
On Fri, 18 Dec 2015 12:03:46 -0500 Lyude wrote: > Signed-off-by: Lyude > --- > Changes > * Add new interfaces to replace reuse of wl_data_(source|offer) > * Get rid of the selection changed event since we now have our own

[PATCH] clients: Fix compositor version check for WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION

2015-12-20 Thread Chris Michael
Signed-off-by: Chris Michael --- clients/simple-damage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/simple-damage.c b/clients/simple-damage.c index 37a81f5..24c67cc 100644 --- a/clients/simple-damage.c +++ b/clients/simple-damage.c @@

Re: [libinput] A query regaring key remap functionality

2015-12-20 Thread Christopher Michael
Peter, First, Thanks for taking the time to provide input (no pun intended) here :) (all else inlined) On 12/21/2015 02:29 AM, Peter Hutterer wrote: On Mon, Dec 21, 2015 at 12:27:08AM -0500, Chris Michael wrote: On 12/18/2015 01:20 AM, 박성진 wrote: Dear all, I have a query regarding key