libinput repository created

2014-01-27 Thread Peter Hutterer
Hi guys after a bit of waiting time, we now have libinput in a fresh, still warm repository on freedesktop: http://cgit.freedesktop.org/wayland/libinput libinput is the weston input handling code forked off into a library. The goal of libinput is to provide a common code base for the various

[PATCH libinput 5/5] tools: add a tool for basic event debugging

2014-01-28 Thread Peter Hutterer
event5 POINTER_MOTION +2.31s -3.00/ 2.00 Time is displayed relative to the starting time. Note: statically linked for easier debugging, but we don't distribute it (yet) anyway. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Makefile.am | 2 +- configure.ac| 3

[PATCH libinput 3/5] path: print error when failing to open a device

2014-01-28 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/path.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/path.c b/src/path.c index 2553005..2b8f530 100644 --- a/src/path.c +++ b/src/path.c @@ -130,7 +130,8 @@ path_input_enable(struct libinput *libinput

[PATCH libinput 4/5] test: Make sure the sysname of a device is correct

2014-01-28 Thread Peter Hutterer
Currently this means start with event and don't contain /. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/path.c | 23 +++ test/udev.c | 34 ++ 2 files changed, 57 insertions(+) diff --git a/test/path.c b/test/path.c index

[PATCH libinput 2/5] path: store the sysname, not the syspath, in the device

2014-01-28 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/path.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/path.c b/src/path.c index 3b09cbe..2553005 100644 --- a/src/path.c +++ b/src/path.c @@ -75,7 +75,7 @@ path_seat_create(struct path_input

libinput requirements for feature parity with X

2014-01-28 Thread Peter Hutterer
Here's a list of features I consider the minimum to get something akin to feature-parity with the current X.Org-based stack. This is not a wishlist for features, it's a list of minimum requirements that covers 90% of the user base. keyboard: I don't think there's much to do, keyboards are fairly

Re: [PATCH libinput 2/2] Remove mention of delta coordinates having device specific direction

2014-01-29 Thread Peter Hutterer
(if it isn't software-rotated). This is probably obvious anyway, and the extra documentation does little other than adding confusion, so Reviewed-by: Peter Hutterer peter.hutte...@who-t.net. Cheers, Peter --- src/libinput.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

Re: [PATCH libinput 1/2] Replace output screen size callback with transform helpers

2014-01-29 Thread Peter Hutterer
On Wed, Jan 29, 2014 at 09:33:11PM +0100, Jonas Ådahl wrote: Instead of automatically transforming absolute coordinates of touch and pointer events to screen coordinates, the user now uses the corresponding transform helper function. This means the coordinates returned by

Re: libinput requirements for feature parity with X

2014-01-30 Thread Peter Hutterer
On Thu, Jan 30, 2014 at 10:30:40AM -0800, Ping Cheng wrote: On Tue, Jan 28, 2014 at 6:18 PM, Peter Hutterer peter.hutte...@who-t.netwrote: Here's a list of features I consider the minimum to get something akin to feature-parity with the current X.Org-based stack. This is not a wishlist

Re: libinput requirements for feature parity with X

2014-01-30 Thread Peter Hutterer
On Thu, Jan 30, 2014 at 01:42:20PM -0800, Bill Spitzak wrote: Ping Cheng wrote: graphics tablets: * extended axis event support * tool change notification (could be just button events? not sure) Will tool id, serial number, and tool type be supported here? Shouldn't each

Re: [PATCH libinput 1/2] Replace output screen size callback with transform helpers

2014-01-30 Thread Peter Hutterer
On Thu, Jan 30, 2014 at 08:38:02AM +0100, Jonas Ådahl wrote: On Thu, Jan 30, 2014 at 01:02:15PM +1000, Peter Hutterer wrote: On Wed, Jan 29, 2014 at 09:33:11PM +0100, Jonas Ådahl wrote: Instead of automatically transforming absolute coordinates of touch and pointer events to screen

Re: libinput mouse mode for tablets

2014-01-30 Thread Peter Hutterer
On Thu, Jan 30, 2014 at 02:14:30PM -0800, Bill Spitzak wrote: It is not clear from this discussion what support there will be for mouse mode for the tablets. A problem I have had with the current tablet api is that it is designed for mapping the tablet to the bounding box surrounding all

[PATCH libinput 4/4] path: add error handling for failing to create a seat

2014-02-03 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/path.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/path.c b/src/path.c index 7a00c0b..a2878f9 100644 --- a/src/path.c +++ b/src/path.c @@ -144,6 +144,11 @@ path_input_enable(struct libinput *libinput) seat

[PATCH libinput 2/4] Move closing the device fd into evdev.c

2014-02-03 Thread Peter Hutterer
evdev_device_remove() already calls close(device-fd). Move the close_restricted call there to avoid one privileged call in the backend and one in the device. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 2 +- src/path.c | 1 - src/udev-seat.c | 3 --- 3 files

[PATCH v2 libinput 2/4] Move opening and closing the device fd into evdev.c

2014-02-05 Thread Peter Hutterer
: since we'd now fail getting the device node from the invalid /tmp path, the open_func_count is 0. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Changes to v1: - move open_restricted into evdev_device_create() If we really get an fd open failure, we now get two error messages, but I'll

[PATCH libinput 3/6] path: add libinput_path_add_device() and libinput_path_remove_device()

2014-02-05 Thread Peter Hutterer
out which DEVICE_ADDED event corresponds to the new device. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/libinput.h | 45 +++ src/path.c | 104 ++-- test/path.c| 114

[PATCH libinput 6/6] test: Add tests for adding/removing devices

2014-02-05 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/path.c | 317 1 file changed, 317 insertions(+) diff --git a/test/path.c b/test/path.c index 3aade76..59d3e5f 100644 --- a/test/path.c +++ b/test/path.c @@ -252,6 +252,25

[PATCH libinput 0/6] Add dynamic devices to the path backend

2014-02-05 Thread Peter Hutterer
This patchset revamps the path backend to allow for more than one path-based device per context. I thought the initial approach of having one context per device is sufficient but there are a few use-cases that can really only be solved by having libinput control all devices. A common example is

[PATCH libinput 1/6] Store the backend type in the interface

2014-02-05 Thread Peter Hutterer
This enables us to prevent callers from calling backend-specific functions on mismatching backends. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/libinput-private.h | 6 ++ src/path.c | 1 + src/udev-seat.c| 1 + 3 files changed, 8 insertions(+) diff

[PATCH libinput 2/6] path: modify backend to allow for more than one device

2014-02-05 Thread Peter Hutterer
-by: Peter Hutterer peter.hutte...@who-t.net --- src/path.c | 120 +++-- src/path.h | 6 +++- 2 files changed, 99 insertions(+), 27 deletions(-) diff --git a/src/path.c b/src/path.c index 4924b31..32483df 100644 --- a/src/path.c +++ b/src

Re: [PATCH libinput 1/6] Store the backend type in the interface

2014-02-06 Thread Peter Hutterer
On Thu, Feb 06, 2014 at 10:11:34PM +0100, Jonas Ådahl wrote: On Thu, Feb 06, 2014 at 02:13:05PM +1000, Peter Hutterer wrote: This enables us to prevent callers from calling backend-specific functions on mismatching backends. This can be done instead by comparing the backend interface

Re: [PATCH libinput 0/6] Add dynamic devices to the path backend

2014-02-06 Thread Peter Hutterer
On Thu, Feb 06, 2014 at 10:23:57PM +0100, Jonas Ådahl wrote: On Thu, Feb 06, 2014 at 02:13:04PM +1000, Peter Hutterer wrote: This patchset revamps the path backend to allow for more than one path-based device per context. I thought the initial approach of having one context per device

Re: [RFC] libinput configuration interface

2014-02-08 Thread Peter Hutterer
:11 GMT+01:00 Alexander E. Patrakov patra...@gmail.com: 2014-02-03 Peter Hutterer peter.hutte...@who-t.net: On Fri, Jan 31, 2014 at 08:26:54PM +0600, Alexander E. Patrakov wrote: Peter Hutterer wrote: I've been thinking about how to add a device configuration interface to libinput

Re: [RFC] libinput configuration interface

2014-02-09 Thread Peter Hutterer
On Sun, Feb 09, 2014 at 01:32:41PM +0100, Eugen Friedrich wrote: On 09.02.2014 05:10, Peter Hutterer wrote: On Thu, Feb 06, 2014 at 11:28:49PM +0100, Eugen Friedrich wrote: Hi together, i would like to put some input from the embedded/ automotive perspective. you can think about huge

[PATCH v2 libinput] Make it possible to have persistent libinput_seat instances

2014-02-09 Thread Peter Hutterer
was discovered with a previously empty seat a new seat instance would always be created, meaning two potential seat instances with identical physical and logical seat name pairs. Signed-off-by: Jonas Ådahl jad...@gmail.com Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Changes to v1

[PATCH libinput] evdev: restore EVDEV_UNHANDLED_DEVICE error code

2014-02-09 Thread Peter Hutterer
If we don't have capabilities we can deal with, return a different error so the backends can handle it separately (they already do). Signe-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/evdev.c b/src

Re: [PATCH libinput] Make touch event slots seat wide

2014-02-10 Thread Peter Hutterer
On Mon, Feb 10, 2014 at 10:11:47AM +0100, Jonas Ådahl wrote: On Mon, Feb 10, 2014 at 03:13:55PM +1000, Peter Hutterer wrote: On Thu, Feb 06, 2014 at 10:27:54PM +0100, Jonas Ådahl wrote: Since a Wayland compositor have to represent all touch devices of a seat as one virtual device, lets

Re: [PATCH libinput 5/5] Add seat wide slot to touch events

2014-02-12 Thread Peter Hutterer
; + device-abs.seat_slot = seat_slot; + seat-slot_map |= 1 seat_slot; I think in light of 4/5 it should be documented that the seat_slot is never -1, lest people expect the same behaviour for both functions. Reviewed-by: Peter Hutterer peter.hutte...@who-t.net

[PATCH libinput] Add a customizable log handler

2014-02-13 Thread Peter Hutterer
(), but let's use log_info, log_error, etc. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/libinput-private.h | 7 ++ src/libinput-util.c| 20 -- src/libinput.c | 62 ++ src/libinput.h | 76 ++ src/path.c

[PATCH libinput 01/19] Add the shell for a multitouch-compatible touchpad implementation

2014-02-16 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/Makefile.am | 1 + src/evdev-mt-touchpad.c | 76 + src/evdev.c | 5 +++- src/evdev.h | 3 ++ 4 files changed, 84 insertions(+), 1 deletion(-) create mode

[PATCH libinput 05/19] touchpad: add two-finger average scrolling

2014-02-16 Thread Peter Hutterer
If two fingers are down and moving, take the average movement of both fingers and use that for scrolling. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff

[PATCH libinput 04/19] touchpad: hook up the pointer acceleration

2014-02-16 Thread Peter Hutterer
Same algorithm as in evdev-touchpad.c Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 76 + 1 file changed, 76 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index f625814..1968199

[PATCH libinput 02/19] touchpad: add a touchpad driver based on per-finger tracking

2014-02-16 Thread Peter Hutterer
different coding style, this is the attempt to get closer to the one used in libinput. Currently sends motion events for single-finger motion, button events only for physical buttons. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 300

[PATCH libinput 03/19] touchpad: add hysteresis smoothing for input coordinates

2014-02-16 Thread Peter Hutterer
Same algorithm as in evdev-touchpad. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 63 + 1 file changed, 63 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 856d54f..f625814

[PATCH libinput 19/19] evdev: drop hook to init old touchpad driver

2014-02-16 Thread Peter Hutterer
Still leaving the driver itself in place for removal later, but only initialize the new driver now. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index ffa8557..7d91e09

[PATCH libinput 16/19] touchpad: add support for clickfingers

2014-02-16 Thread Peter Hutterer
processing is needed here though. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 67 +++-- src/evdev-mt-touchpad.h | 1 + test/pointer.c | 2 +- 3 files changed, 62 insertions(+), 8 deletions(-) diff

[PATCH libinput 12/19] touchpad: require minimum scroll distance and lock scroll direction

2014-02-16 Thread Peter Hutterer
This is a fairly rough approach, but can be handled more fine-grained later. Require a minimum of 1 unit to start scrolling and lock the scrolling in the initial direction, so further scroll events are limited to that direction only. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src

[PATCH libinput 14/19] touchpad: support single-touch touchpads

2014-02-16 Thread Peter Hutterer
Touchpads without ABS_MT_SLOT create 5 slots by default (for up to QUINTTAP) and ABS_X/Y is mapped to the 0-slot touchpoint. This commit adds handling for a single finger, no BTN_TOOL_DOUBLETAP or similar is being processed yet. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src

[PATCH libinput 09/19] touchpad: Make touchpad_get_delta() available from other files

2014-02-16 Thread Peter Hutterer
No functional changes. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 2 +- src/evdev-mt-touchpad.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index e25997d..73ea8a8 100644

[PATCH libinput 06/19] touchpad: move structs into a header file

2014-02-16 Thread Peter Hutterer
The tapping state implementation will be in a separate file, so let's make sure we can access the structs we need. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/Makefile.am | 1 + src/evdev-mt-touchpad.c | 61 + src/evdev-mt-touchpad.h

[PATCH libinput 13/19] touchpad: Only move the pointer when there's a single finger down

2014-02-16 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 14fb7f3..c4c4c41 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c

[PATCH libinput 08/19] touchpad: add a struct for handling physical button event state changes

2014-02-16 Thread Peter Hutterer
-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 54 +++-- src/evdev-mt-touchpad.h | 5 + 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 1d34df8..e25997d

[PATCH libinput 11/19] touchpad: Filter motion in a certain number of tap states

2014-02-16 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad-tap.c | 23 ++- src/evdev-mt-touchpad.c | 22 +++--- src/evdev-mt-touchpad.h | 1 + 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/evdev-mt-touchpad

[PATCH libinput 17/19] touchpad: mark the first finger as pointer-controlling finger

2014-02-16 Thread Peter Hutterer
Unused at the moment, but will be used later to determine if a finger should trigger motion events. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 4 src/evdev-mt-touchpad.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/evdev-mt-touchpad.c b

[PATCH libinput 07/19] touchpad: mark which events are currently pending processing

2014-02-16 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 6 ++ src/evdev-mt-touchpad.h | 9 + 2 files changed, 15 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 8a8586a..1d34df8 100644 --- a/src/evdev-mt-touchpad.c +++ b

[PATCH libinput 15/19] touchpad: add fake-touch support for BTN_TOOL_DOUBLETAP and friends

2014-02-16 Thread Peter Hutterer
. The mask is set for each matching BTN_* event and used to count the number of expected fake touchpoints. From that we begin/end the number of actual touchpoints required. Fake touchpoints take their x/y coordinates from the first touchpoint, which reads ABS_X/ABS_Y. Signed-off-by: Peter Hutterer

[PATCH libinput 18/19] touchpad: Support finger-pinnnig during physical button presses

2014-02-16 Thread Peter Hutterer
. A second finger may then be used to drag. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 87 +++-- src/evdev-mt-touchpad.h | 1 + 2 files changed, 85 insertions(+), 3 deletions(-) diff --git a/src/evdev-mt

Re: [PATCH libinput] evdev: fix device_transform_ functions

2014-02-17 Thread Peter Hutterer
On Mon, Feb 17, 2014 at 01:42:52PM -0500, Benjamin Tissoires wrote: X and Y are li_fixed_t, which is 24.8 fixed point real number. li_fixed_t max is thus ~8388607. On a touchscreen with a range of 32767 values (like a 3M sensor), and mapped on monitor with a resolution of 1920x1080, we

[PATCH libinput 1/2] Hook up libevdev as backend

2014-02-17 Thread Peter Hutterer
). This patch switches all the bit checks over to libevdev and leaves the event processing as-is. Makes it easier to review. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- configure.ac | 7 ++--- src/Makefile.am | 2 ++ src/evdev-touchpad.c | 25 ++- src/evdev.c

[PATCH libinput] evdev: set CLOCK_MONOTONIC as the time source

2014-02-18 Thread Peter Hutterer
Avoids erroneous timestamps when the system time is reset. This used to a be a problem with the X.Org synaptics driver where taps, scrolling and a couple of other things would potentially lock up. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 3 +++ 1 file changed, 3

Re: [RFC] libinput configuration interface

2014-02-18 Thread Peter Hutterer
On Tue, Feb 18, 2014 at 04:33:53PM +, Dominic Jänichen wrote: On Mon, 03 Feb 2014 11:02:42 +1000, Peter Hutterer wrote: tbh, I'm not planning to support every potential option under the sun. There's a fine and rather blurry line between what is a preference and what is merely

Re: [PATCH libinput 2/2] test: Add scale li_fixed overflow test

2014-02-18 Thread Peter Hutterer
On Tue, Feb 18, 2014 at 08:13:58PM +0100, Jonas Ådahl wrote: Add a test case and test device that checks if the scale transform can handle high resolution devices and output monitor resolutions. The test case is created in a way that it will fail if the coordinate transform expression will

Re: [PATCH libinput] evdev: set CLOCK_MONOTONIC as the time source

2014-02-19 Thread Peter Hutterer
On Wed, Feb 19, 2014 at 07:19:15PM +0100, Rui Tiago Cação Matos wrote: On 19 February 2014 13:35, Daniel Stone dan...@fooishbar.org wrote: Can this be CLOCK_MONOTONIC_COARSE instead, to avoid griefing HPET and thus causing much higher power usage? Makes sense and indeed the X server seems

Re: [PATCH libinput] evdev: set CLOCK_MONOTONIC as the time source

2014-02-19 Thread Peter Hutterer
On Tue, Feb 18, 2014 at 07:44:54PM -0800, Thiago Macieira wrote: Em ter 18 fev 2014, às 22:33:26, Jasper St. Pierre escreveu: ... and what if it fails? I'd say that requiring CLOCK_MONOTONIC is fine. Are there any popular Linux setups that don't have CLOCK_MONOTONIC? I'm guessing that

Re: [PATCH libinput 1/2] Add seat wide slot to touch events

2014-02-19 Thread Peter Hutterer
On Wed, Feb 19, 2014 at 10:04:10PM +0100, Jonas Ådahl wrote: Since a Wayland compositor have to represent all touch devices of a seat as one virtual device, lets make that easier by also providing seat wide slots with touch events. Seat wide slots may be accessed using

Re: [RFC] libinput configuration interface

2014-02-19 Thread Peter Hutterer
On Wed, Feb 19, 2014 at 11:55:28AM +0600, Alexander E. Patrakov wrote: 19.02.2014 04:52, Peter Hutterer wrote: The set of touchpad patches I sent out recently already handle this by default. When the physical clickpad button is depressed, the driver picks the finger that is pressing the button

Re: [RFC] libinput configuration interface

2014-02-19 Thread Peter Hutterer
On Thu, Feb 20, 2014 at 12:21:53PM +0600, Alexander E. Patrakov wrote: 20.02.2014 11:14, Peter Hutterer wrote: On Wed, Feb 19, 2014 at 11:55:28AM +0600, Alexander E. Patrakov wrote: 19.02.2014 04:52, Peter Hutterer wrote: The set of touchpad patches I sent out recently already handle

Re: [PATCH libinput 1/2] Add seat wide slot to touch events

2014-02-19 Thread Peter Hutterer
On Thu, Feb 20, 2014 at 08:39:08AM +0100, Jonas Ådahl wrote: On Thu, Feb 20, 2014 at 02:53:18PM +1000, Peter Hutterer wrote: On Wed, Feb 19, 2014 at 10:04:10PM +0100, Jonas Ådahl wrote: Since a Wayland compositor have to represent all touch devices of a seat as one virtual device, lets

Re: [RFC] libinput configuration interface

2014-02-20 Thread Peter Hutterer
On Fri, Feb 21, 2014 at 01:29:05AM +0600, Alexander E. Patrakov wrote: 20.02.2014 12:21, I wrote: 20.02.2014 11:14, Peter Hutterer wrote: On Wed, Feb 19, 2014 at 11:55:28AM +0600, Alexander E. Patrakov wrote: From my experience with the Sony touchpad (Vaio Z23A4R laptop), I'd say

Re: [PATCH libinput 1/2] Hook up libevdev as backend

2014-02-23 Thread Peter Hutterer
On Sat, Feb 22, 2014 at 03:51:57PM +0100, Jonas Ådahl wrote: On Tue, Feb 18, 2014 at 04:09:09PM +1000, Peter Hutterer wrote: libevdev wraps the various peculiarities of the evdev kernel API into a type-safe API. It also buffers the device so checking for specific features at a later time

Re: [PATCH libinput 1/2] Hook up libevdev as backend

2014-02-23 Thread Peter Hutterer
On Mon, Feb 24, 2014 at 09:28:49AM +1000, Peter Hutterer wrote: On Sat, Feb 22, 2014 at 03:51:57PM +0100, Jonas Ådahl wrote: On Tue, Feb 18, 2014 at 04:09:09PM +1000, Peter Hutterer wrote: libevdev wraps the various peculiarities of the evdev kernel API into a type-safe API. It also

Re: [PATCH libinput] test: Add seat slot tests

2014-02-23 Thread Peter Hutterer
On Sat, Feb 22, 2014 at 03:38:28PM +0100, Jonas Ådahl wrote: Add one test that checks uniqueness of seat slots when having multiple devices with active touch points. Add one test that checks that libinput drops touch points when it could not represent them with a seat wide slot. This

Re: [PATCH libinput 2/2] Hook up event processing to libevdev

2014-02-24 Thread Peter Hutterer
On Mon, Feb 24, 2014 at 10:03:59PM +0100, Jonas Ådahl wrote: On Mon, Feb 24, 2014 at 09:44:34AM +1000, Peter Hutterer wrote: On Sat, Feb 22, 2014 at 04:44:06PM +0100, Jonas Ådahl wrote: On Tue, Feb 18, 2014 at 04:09:10PM +1000, Peter Hutterer wrote: This gives us the ability to handle

Re: [PATCH libinput 2/2] Hook up event processing to libevdev

2014-02-24 Thread Peter Hutterer
On Tue, Feb 25, 2014 at 08:17:24AM +1000, Peter Hutterer wrote: static void evdev_device_dispatch(void *data) { struct evdev_device *device = data; struct libinput *libinput = device-base.seat-libinput; - int fd = device-fd; - struct

Re: [PATCH libinput] libinput: Fix the close_restricted interface callback

2014-03-03 Thread Peter Hutterer
On Sat, Mar 01, 2014 at 02:19:03PM -0500, Jasper St. Pierre wrote: libinput is supposed to take a close callback in its interface to allow you to call out to a privileged API to close FDs. But the FD that libinput passes you is bogus, because libinput_remove_source closes the FD on which it's

[RFC PATCH libinput] udev: add libinput_udev_rescan_devices()

2014-03-13 Thread Peter Hutterer
for the udev event to handle this for us. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- The idea here is basically to start a udev context as usual. If the compositor doesn't have the session, open_restricted will fail. Once the ResumeDevice signals are handled by the compositor it can ask

Re: [RFC PATCH libinput] udev: add libinput_udev_rescan_devices()

2014-03-17 Thread Peter Hutterer
On Sat, Mar 15, 2014 at 07:59:29PM +0100, Jonas Ådahl wrote: On Thu, Mar 13, 2014 at 04:18:20PM +1000, Peter Hutterer wrote: When a libinput context for a given seat is initialized, not all devices may be available. Some or all devices may be paused by systemd-logind. Waiting

[PATCH libinput 3/3] Expand documentation for libinput_udev_create_for_seat

2014-03-20 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/libinput.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/libinput.h b/src/libinput.h index d6bf9f8..3e09871 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -691,6 +691,12 @@ struct libinput_interface

[PATCH libinput 1/3] Return the length or a neg errno from libinput_device_get_keys()

2014-03-20 Thread Peter Hutterer
Previous return value was the straight ioctl, we should try to avoid errno mangling. This changes the API, if not the ABI. Callers with code along the lines of if (libinput_device_get_keys() == -1) will now break. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- weston is not affected

[PATCH libinput 2/3] udev: factor out device_removed handling

2014-03-20 Thread Peter Hutterer
No functional changes Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- I needed this for the rescan patch but it makes the calls more symmetrical, so we might as well push it independently. src/udev-seat.c | 41 +++-- 1 file changed, 23 insertions

Re: [RFC PATCH libinput] udev: add libinput_udev_rescan_devices()

2014-03-20 Thread Peter Hutterer
you unref them. Cheers, Peter On Mon, Mar 17, 2014 at 11:21 PM, Peter Hutterer peter.hutte...@who-t.netwrote: On Sat, Mar 15, 2014 at 07:59:29PM +0100, Jonas Ådahl wrote: On Thu, Mar 13, 2014 at 04:18:20PM +1000, Peter Hutterer wrote: When a libinput context for a given seat

Re: [PATCH libinput 00/19] mt touchpad implementation

2014-03-24 Thread Peter Hutterer
On Mon, Feb 17, 2014 at 04:48:19PM +1000, Peter Hutterer wrote: Here's the base of a touchpad implementation that's more geared towards modern multitouch-capable touchpads than the current xorg synaptics driver or, for that matter, the libinput one. just for the archives, I've pushed

Re: [RFC] libinput configuration interface

2014-03-26 Thread Peter Hutterer
hey, sorry about the delay, I got moved to other stuff for a while and only now just picked up libinput again. On Sat, Feb 22, 2014 at 03:33:26PM +0600, Alexander E. Patrakov wrote: 2014-02-21 5:26 GMT+06:00 Peter Hutterer peter.hutte...@who-t.net: On Fri, Feb 21, 2014 at 01:29:05AM +0600

Re: [PATCH libinput 2/8] evdev: Avoid double touch down/up events

2014-03-26 Thread Peter Hutterer
On Wed, Mar 26, 2014 at 07:45:32AM +0100, Michael Schellenberger Costa wrote: I might be dumb but doesnt this require motion between clicks? In that case you would lose for example track balls which do not necessary move between clicks. this is for touch events only here, and the only way

Re: [PATCH libinput 2/8] evdev: Avoid double touch down/up events

2014-03-26 Thread Peter Hutterer
On Wed, Mar 26, 2014 at 08:40:43AM +0100, Jonas Ådahl wrote: On Wed, Mar 26, 2014 at 05:30:14PM +1000, Peter Hutterer wrote: On Wed, Mar 26, 2014 at 07:45:32AM +0100, Michael Schellenberger Costa wrote: I might be dumb but doesnt this require motion between clicks? In that case you

Re: [PATCH libinput 4/8] test: Test handling of many touch points

2014-03-26 Thread Peter Hutterer
On Tue, Mar 25, 2014 at 09:45:55PM +0100, Jonas Ådahl wrote: libinput currently handles 16 per device touch points. Test that we behave as expected when a device has an even higher number of active touch points. Signed-off-by: Jonas Ådahl jad...@gmail.com --- test/touch.c | 50

Re: [PATCH libinput 1/8] evdev: Don't write out of bounds when mt slot is too large

2014-03-26 Thread Peter Hutterer
On Tue, Mar 25, 2014 at 09:45:52PM +0100, Jonas Ådahl wrote: Signed-off-by: Jonas Ådahl jad...@gmail.com patch looks good, but I do wonder if it'd be better to just dynamically allocate slots based on the number of touches. A quick glance shows we don't really need this a fixed length anyway,

Re: [PATCH libinput 1/8] evdev: Don't write out of bounds when mt slot is too large

2014-03-26 Thread Peter Hutterer
On Wed, Mar 26, 2014 at 09:20:27AM +0100, Jonas Ådahl wrote: On Wed, Mar 26, 2014 at 06:05:19PM +1000, Peter Hutterer wrote: On Tue, Mar 25, 2014 at 09:45:52PM +0100, Jonas Ådahl wrote: Signed-off-by: Jonas Ådahl jad...@gmail.com patch looks good, but I do wonder if it'd be better

Re: [PATCH libinput 4/8] test: Test handling of many touch points

2014-03-26 Thread Peter Hutterer
On Wed, Mar 26, 2014 at 09:24:08AM +0100, Jonas Ådahl wrote: On Wed, Mar 26, 2014 at 06:02:46PM +1000, Peter Hutterer wrote: On Tue, Mar 25, 2014 at 09:45:55PM +0100, Jonas Ådahl wrote: libinput currently handles 16 per device touch points. Test that we behave as expected when a device

Re: [PATCH libinput 3/8] test: Add seat slot tests

2014-03-26 Thread Peter Hutterer
On Tue, Mar 25, 2014 at 09:45:54PM +0100, Jonas Ådahl wrote: Add one test that checks uniqueness of seat slots when having multiple devices with active touch points. Add one test that checks that libinput drops touch points when it could not represent them with a seat wide slot. This

Re: [PATCH libinput 5/8] test: Check that libinput doesn't send double touch down/up events

2014-03-26 Thread Peter Hutterer
be worth changing the coordinates here too. It has no real effect but it'll look more like two touchpoints and the evdev events will be more obvious to read too. Reviewed-by: Peter Hutterer peter.hutte...@who-t.net for the patches where I didn't complain about something :) Cheers, Peter

[PATCH libinput] test: add litest helper functions for creating uinput devices

2014-03-26 Thread Peter Hutterer
, EV_REL, REL_X, -1); libevdev_uinput_write_event(uinput, EV_SYN, SYN_REPORT, 0); .. libevdev_uinput_destroy(uinput); Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/litest-bcm5974.c | 43 +++- test/litest-generic-highres-touch.c | 34 +++--- test/litest

Re: [RFC] libinput configuration interface

2014-03-27 Thread Peter Hutterer
On Thu, Mar 27, 2014 at 07:34:37PM +0600, Alexander E. Patrakov wrote: 2014-03-27 19:22 GMT+06:00 Alexander E. Patrakov patra...@gmail.com: (regarding slow scrolling) I don't think so. I have tried to reproduce the bug by hand. It still exists, but ./tools/event-debug still picks the

[PATCH libinput 2/9] Fix up ARRAY_FOR_EACH macro

2014-03-27 Thread Peter Hutterer
Remove compiler warning about signed/unsigned comparison. And while we're at it, rename i to _i in the macro to avoid name clashes. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/libinput-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libinput

[PATCH libinput 5/9] test: disable parallel build in test directory

2014-03-27 Thread Peter Hutterer
We depend on device creation on the host system, having the tests run in parallel runs a risk of random failure. Ideally we'd just disable for the actual run target, but I couldn't figure out how to do that. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/Makefile.am | 2 ++ 1

[PATCH libinput 9/9] Add libinput_device_get_name() to advertise the kernel name

2014-03-27 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- I didn't end up needing this but it seems a nice to have. However, it does lead to a discussion on how much of the device should we expose to the caller through libinput. Right now libinput hides virtually everthing but the sysname

[PATCH libinput 3/9] tools: add --verbose to event-debug

2014-03-27 Thread Peter Hutterer
And redirect the log to stdout. libinput logs to stderr by default, but if we're running with --verbose we want all msgs on the same stream. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- tools/event-debug.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion

[PATCH libinput 1/9] Use log_error instead of fprintf in old touchpad code

2014-03-27 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-touchpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-touchpad.c b/src/evdev-touchpad.c index 65c5ea0..1a48441 100644 --- a/src/evdev-touchpad.c +++ b/src/evdev-touchpad.c @@ -454,7 +454,7

[PATCH libinput 8/9] test: add tests for event conversion and back

2014-03-27 Thread Peter Hutterer
Looks a bit excessive given how simple the base is but hey, we don't want to ever break that bit. That'd be embarrassing. And while we're at it make sure that the 'wrong' event getters return NULL for each event. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- This requires the uinput

Re: SynPS/2 Synaptics TouchPad firmware bug

2014-03-27 Thread Peter Hutterer
On Thu, Mar 27, 2014 at 10:19:50PM +0600, Alexander E. Patrakov wrote: Hello. This is a report of a touchpad firmware bug that I want you to work around in libinput. I found this bug while testing xf86-input-libinput. I guess that the synaptics driver already has a workaround, or the bug

[PATCH libinput 6/9] doc: add state machine SVG to EXTRA_DIST

2014-03-28 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- doc/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 31b673b..75fa98a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,3 +1,5 @@ +EXTRA_DIST = touchpad-tap

[PATCH libinput 8/9] touchpad: Only enable clickfingers on Apple touchpads

2014-03-28 Thread Peter Hutterer
the software button areas introduced in a follow-up commit. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- This should probably be configurable at some point in the future... src/evdev-mt-touchpad-buttons.c | 7 ++- src/evdev-mt-touchpad.h | 1 + test/touchpad.c

[PATCH libinput 7/9] touchpad: save the active clickfinger button

2014-03-28 Thread Peter Hutterer
To avoid having a button left press and a button right release if the number of fingers changes. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad-buttons.c | 22 +- src/evdev-mt-touchpad.h | 1 + 2 files changed, 14 insertions(+), 9

[PATCH libinput 4/9] touchpad: don't allow tapping while any button is down

2014-03-28 Thread Peter Hutterer
Immediately set the state to DEAD, waiting for the tap release to go back to idle. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad-tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c

[PATCH libinput 2/9] touchpad: after a click, lock the finger to its current position

2014-03-28 Thread Peter Hutterer
On clickpads, releasing the button usually causes some motion events. To avoid erroneous movements, lock the finger into position on the up event and don't allow for motion events until we move past a given threshold (currently 2% of the touchpad diagonal). Signed-off-by: Peter Hutterer

[PATCH libinput 3/9] touchpad: reset the tap timer_fd to -1 on destroy

2014-03-28 Thread Peter Hutterer
No real effect, just for safety Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad-tap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index 5fa712f..bcc5700 100644 --- a/src/evdev-mt

Re: SynPS/2 Synaptics TouchPad firmware bug

2014-03-28 Thread Peter Hutterer
On 29/03/2014 04:54 , Alexander E. Patrakov wrote: 2014-03-29 0:16 GMT+06:00 Alexander E. Patrakov patra...@gmail.com: No problem, I just did that for you. See the attached patch. Seems to work here, but I am not 100% sure, especially about the non-mt case. It does prevent sudden pointer jumps

Re: [libinput] AC_PROG_CXX missing in libinput/configure.ac

2014-03-30 Thread Peter Hutterer
On Sat, Mar 29, 2014 at 07:12:59PM +0100, Sylvain BERTRAND wrote: On Sat, Mar 29, 2014 at 06:59:12PM +0100, Jonas Ådahl wrote: Yes, for now at least. Sad. But till there is no crazy code generator, it should be easy to write a makefile/shell script to by-pass the autotools and build the

[PATCH libinput 2/5] test: if no teardown func is set, use the default

2014-03-31 Thread Peter Hutterer
Reduces the amount of boilerplate code. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/litest-bcm5974.c | 2 +- test/litest-generic-highres-touch.c | 2 +- test/litest-keyboard.c | 2 +- test/litest-mouse.c | 2 +- test/litest-synaptics

[PATCH libinput 5/5] test: switch the remaining devices to a description-based device

2014-03-31 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/litest-bcm5974.c | 147 ++- test/litest-generic-highres-touch.c | 128 test/litest-keyboard.c | 231 +--- test/litest-mouse.c

  1   2   3   4   5   6   7   8   9   10   >