[PATCH libinput 15/14] switch: for surface 3 tablets, write the lid open to the device

2017-01-29 Thread Peter Hutterer
These tablets only ever give us a close event, the open event is broken. So when we detect keyboard events, fix the kernel device's state by writing the event to the fd. We still sync the lid state manually, in case this fails and we don't get the SW_LID through the normal event sequence. If it wo

Re: [PATCH] [weston, v4] weston.ini: Add natural scroll support to weston.ini This adds support for enabling/disabling natural scrolling via a boolean in weston.ini:

2017-01-29 Thread Jiayi Zhao
Darn, that's not what I wanted! This may take longer than I thought. Jiayi On Jan 29, 2017 4:42 PM, "Peter Hutterer" wrote: > On Fri, Jan 27, 2017 at 09:46:49PM -0500, Jiayi Zhao wrote: > > [libinput] > > natural_scroll=true > > > > CHANGES: > > - libinput_device_config_scroll_has_natural_scro

[PATCH libinput 11/11] test: add touchpad pressure tests

2017-01-29 Thread Peter Hutterer
Signed-off-by: Peter Hutterer --- test/test-touchpad.c | 223 +++ 1 file changed, 223 insertions(+) diff --git a/test/test-touchpad.c b/test/test-touchpad.c index 7575033..ec738e9 100644 --- a/test/test-touchpad.c +++ b/test/test-touchpad.c @@ -469

[PATCH libinput 09/11] test: add the right pressure bits.

2017-01-29 Thread Peter Hutterer
Signed-off-by: Peter Hutterer --- test/test-touchpad.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/test/test-touchpad.c b/test/test-touchpad.c index b8ca0b9..7575033 100644 --- a/test/test-touchpad.c +++ b/test/test-touchpad.c @@ -1686,6 +1686,7 @@ START_TEST(touchpad_semi_mt

[PATCH libinput 07/11] test: switch the semi-mt devices to use the litest semi-mt handling

2017-01-29 Thread Peter Hutterer
Signed-off-by: Peter Hutterer --- test/litest-device-alps-dualpoint.c | 66 -- test/litest-device-alps-semi-mt.c| 66 -- test/litest-device-synaptics-hover.c | 68 3 files changed, 69 inserti

[PATCH libinput 10/11] touchpad: use pressure values for touch is-down decision

2017-01-29 Thread Peter Hutterer
Don't rely on BTN_TOUCH for "finger down", the value for that is hardcoded in the kernel and not always suitable. Some devices need a different value to avoid reacting to accidental touches or hovering fingers. Implement a basic Schmitt trigger, same as we have in the synaptics driver. We also tak

[PATCH libinput 08/11] test: make sure touch up resets pressure

2017-01-29 Thread Peter Hutterer
Should be overridden by the test devices where something more fine-grained is needed. Signed-off-by: Peter Hutterer --- test/litest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/litest.c b/test/litest.c index 42d97d6..c1177b8 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1583,6

[PATCH libinput 05/11] test: convert event handling while loops into for loops

2017-01-29 Thread Peter Hutterer
No functional changes, just enables us to use 'continue' instead of piling up negated conditions. Signed-off-by: Peter Hutterer --- test/litest.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/test/litest.c b/test/litest.c index 3bc58d9..ff655

[PATCH libinput 01/11] test: add two more touch..._extended functions

2017-01-29 Thread Peter Hutterer
So we can set pressure during touch sequences Signed-off-by: Peter Hutterer --- test/litest.c | 22 ++ test/litest.h | 8 2 files changed, 30 insertions(+) diff --git a/test/litest.c b/test/litest.c index b3e7ba3..1bb18dd 100644 --- a/test/litest.c +++ b/test/lites

[PATCH libinput 06/11] test: handle semi-mt devices in litest

2017-01-29 Thread Peter Hutterer
Don't rely on the devices to handle themselves, just handle it globally Signed-off-by: Peter Hutterer --- test/litest.c | 230 +++--- test/litest.h | 33 + 2 files changed, 207 insertions(+), 56 deletions(-) diff --git a/test/litest.c

[PATCH libinput 02/11] test: force a pressure of 0 when we hover a touch

2017-01-29 Thread Peter Hutterer
As we switch to pressure-based touch detection, we need for all pressure-capable touchpads to send pressure values. They'll do so by filling in an axis default but that breaks our current hover code. Make sure the hover litest helpers force a pressure of 0. Signed-off-by: Peter Hutterer --- tes

[PATCH libinput 04/11] test: allow nesting of litest_push_event_frame()

2017-01-29 Thread Peter Hutterer
Right now, we fail if we call litest_push_event_frame() when already inside a frame. For the semi-mt handling we need to do exactly that though, so turn it into a counting semaphore instead. Signed-off-by: Peter Hutterer --- test/litest.c | 13 - test/litest.h | 2 +- 2 files change

[PATCH libinput 00/11] Touchpad pressure-based touch detection

2017-01-29 Thread Peter Hutterer
So far, we've relied on BTN_TOUCH on touchpads to detect whether a touch is down. This is a value decided by the kernel and not always useful, e.g. see the various bugs hanging off https://bugs.freedesktop.org/show_bug.cgi?id=99355 we already had a bit of pressure detection for thumb detection, b

[PATCH libinput 03/11] touchpad: ignore hovering touches when tapping

2017-01-29 Thread Peter Hutterer
We need to remember whether a tap was down or just hovering, otherwise we mess up the state machine when we send tap release events for taps that never switched to TOUCH_BEGIN. This is quick fix, really we should have a new state here, but that's a lot harder to implement. Signed-off-by: Peter Hut

Re: [PATCH] [weston, v4] weston.ini: Add natural scroll support to weston.ini This adds support for enabling/disabling natural scrolling via a boolean in weston.ini:

2017-01-29 Thread Peter Hutterer
On Fri, Jan 27, 2017 at 09:46:49PM -0500, Jiayi Zhao wrote: > [libinput] > natural_scroll=true > > CHANGES: > - libinput_device_config_scroll_has_natural_scroll() is no longer compared > to != 0 > - added configuration option to weston.ini man page > > Signed-off-by: Jiayi Zhao > --- > compo