[PATCH libinput] test: fix Coverity complaints

2015-02-18 Thread Peter Hutterer
seat_button_count seat_key_count ... uninitialized variable t = zalloc s = zalloc ... dereferencing potential NULL-pointer d-ntouches_down... side-effect in assertion Coverity run against the 0.10.0 tag, see https://scan.coverity.com/projects/4298 Signed-off-by: Peter Hutterer peter.hutte

[PATCH v2 libinput 10/15] tools: only print the tablet axes we have on the tool

2015-02-18 Thread Peter Hutterer
This doesn't really have an effect, since we don't set the per-tool axes correctly yet. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Changes to v1: - factor out into print_tablet_axes() so we can use the logic from proximity and axes events - only print tilt if the tool supports

Re: libinput in Coverity

2015-02-18 Thread Peter Hutterer
On Wed, Feb 18, 2015 at 10:06:25AM +1000, Peter Hutterer wrote: On Tue, Feb 17, 2015 at 11:19:58PM +0100, Carlos Olmedo Escobar wrote: I was trying to check libinput in Coverity but it seems it's not there yet. Is there anybody who is supposed to register libinput there? fwiw, I ran

[RFC libinput 1/2] Add a buttonset interface for button-only devices

2015-02-11 Thread Peter Hutterer
for the common use-cases. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 1 + src/evdev-tablet.c | 1 + src/evdev.c | 15 +++ src/evdev.h | 10 ++ src/libinput-private.h | 1 + src/libinput.c | 163

[RFC libinput 0/2] Buttonset interface

2015-02-11 Thread Peter Hutterer
First a heads-up: these patches are an RFC and not fully polished yet. At this point I've looked at everything long enough that I won't see any bugs anymore though. And now we're at the point that we need some feedback anyway. This set adds a buttonset interface. The tablet branch so far only

[RFC libinput 2/2] buttonset: implement buttonset handling for Wacom tablet pads

2015-02-11 Thread Peter Hutterer
and suppress it. Won't work if any finger is down on any other wheel, strip or button but that's a kernel bug we'll fix once we figure out how. Signed-off-by: Benjamin Tissoires benjamin.tissoi...@redhat.com Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/Makefile.am

[PATCH libinput] evdev: check the first parent of the event node for ID_INPUT tags

2015-02-12 Thread Peter Hutterer
Bluetooth tablet devices' rules can't tag the event node directly, they can only tag the first parent (the /sys/class/input/input1234 node). Check that parent for tags too, lest we miss something important. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 19

Re: [PATCH libinput v4 1/2] add simple symbols leak checker

2015-02-12 Thread Peter Hutterer
On Thu, Feb 12, 2015 at 09:25:36AM -0500, Marek Chalupa wrote: This patch adds simple script that compares libinput.sym file to the functions that are marked by LIBINPUT_EXPORT. This script is added to make check target. v2. use noinst_SCRIPTS instead of dummy target drop .sh suffix

[PATCH v3 libinput 2/3] Add udev bits to assign LIBINPUT_DEVICE_GROUP

2015-02-12 Thread Peter Hutterer
but also devices like mice with multiple interfaces. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Changes to v2: - add special handling for 22HD Makefile.am | 2 +- configure.ac | 17 +++- udev/.gitignore | 1

[PATCH libinput] Add libinput_device_pointer_has_button over the plain has_button

2015-02-12 Thread Peter Hutterer
If a device has multiple capabilities, has_button is imprecise. A device with tablet and pointer capability for example may have BTN_LEFT on the pointer interface but not on the tablet interface. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/libinput.c | 10 -- src

Re: [RFC libinput 1/2] Add a buttonset interface for button-only devices

2015-02-12 Thread Peter Hutterer
On Thu, Feb 12, 2015 at 12:37:12PM +0100, Hans de Goede wrote: Hi, On 12-02-15 08:33, Peter Hutterer wrote: A generic interface for devices that provide buttons and axes, but don't control the pointer. This caters for the Pad part of Wacom graphics tablets but could eventually also deal

Re: [RFC libinput 1/2] Add a buttonset interface for button-only devices

2015-02-12 Thread Peter Hutterer
On 13/02/2015 14:32 , Peter Hutterer wrote: On Thu, Feb 12, 2015 at 12:37:12PM +0100, Hans de Goede wrote: Hi, On 12-02-15 08:33, Peter Hutterer wrote: A generic interface for devices that provide buttons and axes, but don't control the pointer. This caters for the Pad part of Wacom graphics

Re: [PATCH libinput] Add libinput_device_pointer_has_button over the plain has_button

2015-02-16 Thread Peter Hutterer
On Mon, Feb 16, 2015 at 12:35:13PM -0800, Bill Spitzak wrote: On 02/13/2015 07:06 PM, Peter Hutterer wrote: On 14/02/2015 11:17 , Bill Spitzak wrote: On 02/13/2015 04:46 PM, Peter Hutterer wrote: On 14/02/2015 05:00 , Bill Spitzak wrote: Actually, more to the point, it sounds like

Re: [PATCH libinput] Add an API for touchpad gesture events

2015-02-17 Thread Peter Hutterer
On Thu, Feb 12, 2015 at 12:27:49PM +0100, Hans de Goede wrote: For touchscreens we always send raw touch events to the compositor, and the compositor or application toolkits do gesture recognition. This makes sense because on a touchscreen which window / widget the touches are over is

Re: [PATCH libinput v2 6/8] tablet: Include starting values of axes in proximity events

2015-02-18 Thread Peter Hutterer
On Wed, Feb 18, 2015 at 01:42:27AM -0500, Stephen Chandler Paul wrote: Having a motion event that's sent right after the original proximity event just to give the values of each axis is somewhat redundant. Since we already include the values of each axis with each type of event, we may as

Re: [PATCH libinput 00/15] tablet: support the remaining tools

2015-02-18 Thread Peter Hutterer
On Wed, Feb 18, 2015 at 10:18:59AM -0500, Benjamin Tissoires wrote: Hi Peter, On Wed, Feb 18, 2015 at 12:45 AM, Peter Hutterer peter.hutte...@who-t.net wrote: This patchset adds the remaining tools to the tablet branch (at least for Wacom tools). The notable additions are: * rotation

Re: [PATCH libinput 01/11] Add an API for touchpad gesture events

2015-02-19 Thread Peter Hutterer
On Wed, Feb 18, 2015 at 11:36:18AM -0800, Bill Spitzak wrote: On 02/18/2015 04:26 AM, Hans de Goede wrote: For touchscreens we always send raw touch events to the compositor, and the compositor or application toolkits do gesture recognition. This makes sense because on a touchscreen which

Re: [PATCH libinput] Add libinput_device_pointer_has_button over the plain has_button

2015-02-16 Thread Peter Hutterer
On Mon, Feb 16, 2015 at 01:19:38PM -0800, Bill Spitzak wrote: On 02/16/2015 01:05 PM, Peter Hutterer wrote: besides, this doesn't really help, you usually want to know if a device has a specific button well before you get the first event. so the real source to use here would

Re: [RFC libinput 1/2] Add a buttonset interface for button-only devices

2015-02-16 Thread Peter Hutterer
On Mon, Feb 16, 2015 at 08:13:01AM +0100, Hans de Goede wrote: Hi, On 16-02-15 04:50, Peter Hutterer wrote: snip ok, I've played around with the ideas in this thread and discussed it with Benjamin this morning. Short summary: I think we should go with the original patch

Re: [RFC libinput 1/2] Add a buttonset interface for button-only devices

2015-02-19 Thread Peter Hutterer
On Thu, Feb 19, 2015 at 12:35:52PM +0100, Carlos Garnacho wrote: Hey :), On Thu, Feb 19, 2015 at 2:29 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On Wed, Feb 18, 2015 at 11:52:18PM +0100, Carlos Garnacho wrote: I'm not sure left/right specifically is something we want to tell

Re: [PATCH libinput 2/8 v2] tablet: Add a left handed mode and tests

2015-02-17 Thread Peter Hutterer
On Mon, Feb 16, 2015 at 10:48:40PM -0500, Stephen Chandler Paul wrote: On the majority of Wacom tablets, the buttons are on the left side, opposite of the side where the palm is meant to rest. Because of this, it's impossible to use the tablet with your left hand (comfortably, anyway) unless

Re: [PATCH 2/2] libinput: Check if axis value is available in debugging GUI

2015-01-26 Thread Peter Hutterer
On Fri, Jan 23, 2015 at 10:31:05PM +0100, c...@schoeller.se wrote: From: Friedrich Schöller c...@schoeller.se libinput complained with lots of client bug messages because the GUI tool did not check which axis values were available. Signed-off-by: Friedrich Schöller c...@schoeller.se both

[PATCH libinput 1/3] test: add litest_drain_typed_events

2015-01-26 Thread Peter Hutterer
For the case where we don't care about a specific set of events in the queue and want to jump over them. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/litest.c | 45 + test/litest.h | 2 ++ 2 files changed, 47 insertions(+) diff

[PATCH libinput 2/3] Restore capability events

2015-01-26 Thread Peter Hutterer
(since it removes the device). Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 2 +- src/evdev.c | 40 +-- src/evdev.h | 3 +- src/libinput-private.h | 8 +++ src/libinput.c | 82

[PATCH libinput 3/3] Deprecate libinput_device_has_capability

2015-01-26 Thread Peter Hutterer
-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/libinput.h | 9 +++-- test/touch.c | 16 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/libinput.h b/src/libinput.h index 50bedc8..1029483 100644 --- a/src/libinput.h +++ b/src/libinput.h

[PATCH libinput 0/3] Restore capability events

2015-01-26 Thread Peter Hutterer
Short summary: we had capability events in libinput which worked essentially like wayland's capability events. They were kicked out (by me) because by the time we get a device from the kernel it is static and won't change anymore. So capabilities make sense on the protocol where pointers may get

Re: [RFC libinput] Add an API for touchpad gesture events

2015-01-26 Thread Peter Hutterer
On Tue, Jan 27, 2015 at 10:55:50AM +0800, Jonas Ådahl wrote: On Tue, Jan 27, 2015 at 12:15:49PM +1000, Peter Hutterer wrote: On Fri, Jan 23, 2015 at 12:20:55PM +0100, Hans de Goede wrote: Hi, On 23-01-15 09:51, Jonas Ådahl wrote: On Fri, Jan 23, 2015 at 09:38:06AM +0100, Hans de

Re: [RFC libinput] Add an API for touchpad gesture events

2015-01-26 Thread Peter Hutterer
On Fri, Jan 23, 2015 at 12:20:55PM +0100, Hans de Goede wrote: Hi, On 23-01-15 09:51, Jonas Ådahl wrote: On Fri, Jan 23, 2015 at 09:38:06AM +0100, Hans de Goede wrote: Hi, On 23-01-15 07:18, Jonas Ådahl wrote: snip As for 2 finger swipe at least: isn't that covered by scrolling?

Re: [RFC libinput] Add an API for touchpad gesture events

2015-01-26 Thread Peter Hutterer
On Tue, Jan 27, 2015 at 01:49:30PM +0800, Jonas Ådahl wrote: On Tue, Jan 27, 2015 at 02:22:02PM +1000, Peter Hutterer wrote: On Tue, Jan 27, 2015 at 10:55:50AM +0800, Jonas Ådahl wrote: On Tue, Jan 27, 2015 at 12:15:49PM +1000, Peter Hutterer wrote: On Fri, Jan 23, 2015 at 12:20:55PM

[PATCH v2 libinput 3/3] Deprecate libinput_device_has_capability

2015-01-27 Thread Peter Hutterer
-off-by: Peter Hutterer peter.hutte...@who-t.net --- Changes to v1: - check for TOUCH to not be in the capability events src/libinput.h | 9 +++-- test/touch.c | 29 +++-- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/libinput.h b/src/libinput.h

[PATCH v2 libinput] Restore capability events

2015-01-27 Thread Peter Hutterer
(since it removes the device). Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Changes to v1: - rename device_register_capability to device_notify_capability_added, same for removed - add/split out evdev_device_notify_capability_removed from evdev_device_suspend (instead

Re: [PATCH weston 2/2] libinput: Ignore non seat wide keyboard key events

2015-01-27 Thread Peter Hutterer
as if there was only one keyboard device associated with the given seat, so to achieve this, ignore every event where forwarding it would result in multiple 'pressed' or 'released' notifications. Signed-off-by: Jonas Ådahl jad...@gmail.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net for both

Re: [PATCH weston 1/2] libinput: Ignore non seat wide pointer button events

2015-01-28 Thread Peter Hutterer
On Wed, Jan 28, 2015 at 01:09:09PM -0800, Bill Spitzak wrote: I would greatly prefer to get an event when this happens. The user expects something to happen when they push a button. You cannot just throw it away. X does this, OS X does this too. I suspect Windows does as well because quite

[PATCH libinput 4/4] test: add tests for new lenovo touchpads

2015-01-28 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 6 + test/litest-synaptics-x1-carbon-3rd.c | 1 + test/touchpad.c | 291 ++ 3 files changed, 298 insertions(+) diff --git a/src/evdev-mt

[PATCH libinput 3/4] touchpad: re-route trackpoint buttons on the *50 Lenovo series

2015-01-28 Thread Peter Hutterer
that tag to identify them and re-route the events through the trackstick device after mangling the event codes to represent the actual buttons. [1] http://cgit.freedesktop.org/systemd/systemd/tree/hwdb/70-touchpad.hwdb Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c

[PATCH libinput 0/4] Lenovo X1 Carbon 3rd support

2015-01-28 Thread Peter Hutterer
Lenovo is back with a new generation hardware, the trackpoint's physical buttons are back, and our headache is back too. Lenovo decided to wire the buttons to the touchpad so they show up as BTN_0, 1, 2. Which means we have to re-route them through the trackpoint device, much like we already do

[PATCH libinput 2/4] test: add a test device for the Lenovo X1 Carbon 3rd

2015-01-28 Thread Peter Hutterer
://patchwork.kernel.org/patch/5730451/ Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/Makefile.am | 1 + test/litest-synaptics-x1-carbon-3rd.c | 110 ++ test/litest.c | 2 + test/litest.h | 1

[PATCH libinput 1/4] test: set the input_id-version as well in litest devices

2015-01-28 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- test/litest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/litest.c b/test/litest.c index 7d48278..b5ce0a8 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1048,6 +1048,7 @@ litest_create_uinput_device_from_description(const

Re: [RFC libinput] Add an API for touchpad gesture events

2015-01-28 Thread Peter Hutterer
On Wed, Jan 28, 2015 at 04:02:20PM +0100, Hans de Goede wrote: Hi, On 28-01-15 14:02, Carlos Garnacho wrote: Hey Hans, On mié, 2015-01-28 at 08:38 +0100, Hans de Goede wrote: snip Ok, I'll change this to mm for v3 then (just send v2 addressing the other review comments and adding a

Re: [RFC libinput] Add an API for touchpad gesture events

2015-01-28 Thread Peter Hutterer
On Wed, Jan 28, 2015 at 06:18:44PM +, Carlos Garnacho wrote: Hey, On mié, 2015-01-28 at 15:51 +0100, Hans de Goede wrote: Hi, On 28-01-15 13:59, Carlos Garnacho wrote: Hey Hans!, (sorry for chiming in late, things got busy around Fosdem...) On jue, 2015-01-22 at 16:52

Re: [RFC libinput] Add an API for touchpad gesture events

2015-01-29 Thread Peter Hutterer
On 29/01/2015 20:58 , Carlos Garnacho wrote: On jue, 2015-01-29 at 16:26 +1000, Peter Hutterer wrote: On Wed, Jan 28, 2015 at 06:18:44PM +, Carlos Garnacho wrote: Hey, On mié, 2015-01-28 at 15:51 +0100, Hans de Goede wrote: Hi, On 28-01-15 13:59, Carlos Garnacho wrote: Hey Hans

[PATCH libinput] test: add per-device udev rule support

2015-02-01 Thread Peter Hutterer
run once per test-case, not once per test function. For us, that means they're only run once per device (we use the devices as test case), i.e. if a test fails and the udev rule isn't tidied up, the next test may be unpredictable. This shouldn't matter too much though. Signed-off-by: Peter

Re: [PATCH libinput 2/2] Rename functions for left handed device configurations

2015-01-05 Thread Peter Hutterer
On Mon, Jan 05, 2015 at 05:44:38PM -0500, Stephen Chandler Paul wrote: Some devices require more then just flipping around the buttons, such as tablets. typo: then - than and pls sign off your patches. pls also add a sentence to explain what is necessary, in this particular case we need to

Re: [PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

2015-01-05 Thread Peter Hutterer
On Mon, Jan 05, 2015 at 04:29:48PM -0800, Thiago Macieira wrote: On Monday 05 January 2015 12:00:24 Hans de Goede wrote: + return __builtin_ffs(tp-fake_touches 1); Why the builtin instead of ffs from strings.h? simple answer: was the first one that google came up with. does it matter much

Re: [PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count

2015-01-05 Thread Peter Hutterer
On Tue, Jan 06, 2015 at 01:39:24PM +0800, Jonas Ådahl wrote: On Tue, Jan 06, 2015 at 01:00:08PM +1000, Peter Hutterer wrote: On Mon, Jan 05, 2015 at 04:29:48PM -0800, Thiago Macieira wrote: On Monday 05 January 2015 12:00:24 Hans de Goede wrote: + return __builtin_ffs(tp

Re: [PATCH weston v2 2/2] releasing: Add example commands to release directions

2015-01-11 Thread Peter Hutterer
to using the X.org release.sh script in place of some of the manual steps. Signed-off-by: Bryce Harrington br...@osg.samsung.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net for both Cheers, Peter --- releasing.txt | 46 +++--- 1 file changed

Re: [PATCH libinput] build-pedantic: use main(void)

2015-01-11 Thread Peter Hutterer
On Fri, Jan 09, 2015 at 10:34:46AM +0100, Marek Chalupa wrote: Main has unused parameters argc and argv. Since they are unused and C 99 allows to prototype main as 'int main(void)', remove them and replace by void. It fixes build when unused parameters are treated as errors. Signed-off-by:

[PATCH libinput 1/2] Change the scroll step distance to 15 and document it as degrees

2015-01-11 Thread Peter Hutterer
that leaves the option of really fine-grained step sizes. We currently assume all mice have 15 degree angles. Like the DPI settings, it will require a udev property to be set. Patch for that to follow. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c| 2 +- src

[PATCH libinput 2/2] Parse the MOUSE_WHEEL_CLICK_ANGLE udev property if present

2015-01-11 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- doc/device-configuration-via-udev.dox | 4 src/evdev.c | 29 +++-- src/evdev.h | 3 +++ src/libinput-util.c | 30

Re: [PATCH v2 libinput] Change axis events to carry all directions

2015-01-11 Thread Peter Hutterer
On Fri, Jan 09, 2015 at 01:05:53PM +0100, Hans de Goede wrote: Hi, On 07-01-15 02:33, Peter Hutterer wrote: Sending separate axis events instead of one unified events is limiting, especially when simultaneously scrolling in both directions and the caller tries to implement kinetic scrolling

Re: [PATCH v1] Added touch support to wayland backend

2015-01-11 Thread Peter Hutterer
On Wed, Dec 17, 2014 at 04:11:56PM +0200, Imran Zaman wrote: Nested westons (with wayland backend as child weston) is one possible use case for the needed touch support. Signed-off-by: Imran Zaman imran.za...@gmail.com Have a look at these patches:

Re: [PATCH libinput 1/2] Change the scroll step distance to 15 and document it as degrees

2015-01-11 Thread Peter Hutterer
On Mon, Jan 12, 2015 at 09:37:05AM +0800, Jonas Ådahl wrote: On Mon, Jan 12, 2015 at 09:12:35AM +1000, Peter Hutterer wrote: Similar to the mouse resolution, let's make the scroll distance a sensible predictable value. Most mice use a 15 degree angle per scroll click, so let's change

[PATCH libinput] test: add another hover test

2015-01-06 Thread Peter Hutterer
Release one touch point at the same time as a fake touch. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- I'll squash it in with the other tests before merging but for easier review it's separate here. This tests for the scenario Hans pointed out with one touch ending as we switch

Re: [PATCH libinput 2/5] touchpad: hook up click method configuration

2015-01-06 Thread Peter Hutterer
On Mon, Jan 05, 2015 at 11:28:32AM +0100, Hans de Goede wrote: Hi Peter, First of all the rest of this series (1/5 [3-5]/5) look good and are: Reviewed-by: Hans de Goede hdego...@redhat.com I've some remarks on this one though. On 10-12-14 05:15, Peter Hutterer wrote: Allow switching

Re: [PATCH 2/2] releasing: Add example commands to release directions

2015-01-06 Thread Peter Hutterer
On Tue, Jan 06, 2015 at 02:08:39PM -0800, Bryce Harrington wrote: Note that for weston, configure.ac needs version numbers updated in several places. `make distcheck` for weston no longer triggers the test suite to run, so update the directions to account for this. Detail the commands to run

[PATCH v2 libinput 3/6] touchpad: add a TOUCH_HOVERING state

2015-01-06 Thread Peter Hutterer
, switch them back into HOVERING if the BTN_TOOL_FINGER is still set, otherwise end them properly. https://bugs.freedesktop.org/show_bug.cgi?id=87197 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- changes to v1: - rename tp_begin_touch to tp_new_touch - add tp_begin_touch to set

Re: [PATCH weston] desktop-shell: Don't crash on zoom without a pointer in the seat

2015-01-06 Thread Peter Hutterer
. having said that, this patch looks fine for what it does Reviewed-by: Peter Hutterer peter.hutte...@who-t.net Cheers, Peter --- desktop-shell/shell.c | 5 + 1 file changed, 5 insertions(+) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index a7514f7..0ec6d33 100644

Re: [PATCH v3 libinput 2/2] Rename functions for left handed device configurations

2015-01-06 Thread Peter Hutterer
On Tue, Jan 06, 2015 at 09:20:22PM -0500, Stephen Chandler Paul wrote: Some devices require more than just flipping around the buttons, such as tablets. When it comes to devices like tablets, because the position of the palm rest is on the right, the entire tablet has to be flipped around in

Re: [PATCH libinput 2/2] Dropped an extra 'the'

2015-01-06 Thread Peter Hutterer
was triggered. + * after the event was triggered. * @note It is an application bug to call this function for events other than * @ref LIBINPUT_EVENT_POINTER_BUTTON. For other events, this function -- 2.1.0 Reviewed-by: Peter Hutterer peter.hutte...@who-t.net for both, but feel free to push

Re: [PATCH weston] desktop-shell: Don't crash on zoom without a pointer in the seat

2015-01-06 Thread Peter Hutterer
On Tue, Jan 06, 2015 at 07:49:50PM -0600, Derek Foreman wrote: On 06/01/15 04:04 PM, Peter Hutterer wrote: On Tue, Jan 06, 2015 at 02:28:13PM -0600, Derek Foreman wrote: The zoom effect zooms at the seat's current pointer location. When no pointer is present the zoom key bindings cause

[PATCH v2 libinput] Change axis events to carry all directions

2015-01-06 Thread Peter Hutterer
() is for. We also need the mask to notify of a scroll stop event, which could otherwise be confused as a vertical-only or horizontal-only event. This is an API and ABI break. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- I think I addressed the comments but I'm not 100% sure. Squashed both

[PATCH v3 libinput] touchpad: add a TOUCH_HOVERING state

2015-01-12 Thread Peter Hutterer
, switch them back into HOVERING if the BTN_TOOL_FINGER is still set, otherwise end them properly. https://bugs.freedesktop.org/show_bug.cgi?id=87197 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- to v2: - track whether a sequence has ended in t-has_ended and use that to decide

[PATCH (diff only) libinput] touchpad: track touch sequences that ended

2015-01-12 Thread Peter Hutterer
Note: this patch is just for easier review, see below for the real patch (with this one squashed in) http://lists.freedesktop.org/archives/wayland-devel/2015-January/019352.html A touch in the touchpad code refers to one on the touchpad. When we hover, the touch ends but the touch sequence may

[PATCH weston] libinput-device: use the new merged scroll events

2015-01-12 Thread Peter Hutterer
libinput now provides a single event for scroll events. Extract the axes from that event and split them into the wl events. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Patch for the as yet unreleased libinput 0.8. Do not merge yet, it'll break the build. src/libinput-device.c

[PATCH v2 libinput] Add libinput_event_pointer_get_axis_value_discrete() to count wheel clicks

2015-01-13 Thread Peter Hutterer
the angle on a mouse wheel. Provide that value when needed. Adding a discrete value to the axis event leaves the possibility of defining discrete units for finger/continuous scroll sources in the future. Right now, these will always reuturn 0. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

[PATCH weston] libinput-device: use the discrete axis value for wheel events

2015-01-13 Thread Peter Hutterer
libinput 0.8 sent wheel click events with value 10. Since 0.8 the value is the angle of the click in degrees but it now provides the click count as separate value. To keep backwards-compat with existing clients, we just send multiples of the click count. Signed-off-by: Peter Hutterer peter.hutte

[PATCH v4 libinput] touchpad: add a TOUCH_HOVERING state

2015-01-13 Thread Peter Hutterer
, switch them back into HOVERING if the BTN_TOOL_FINGER is still set, otherwise end them properly. https://bugs.freedesktop.org/show_bug.cgi?id=87197 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- This time for sure ;) Changes to v3: - drop the has_ended leftover from tp_end_touch - drop

[PATCH libinput] Add libinput_event_pointer_get_axis_click_count() to count wheel clicks

2015-01-12 Thread Peter Hutterer
the angle on a mouse wheel. Provide that value when needed. Adding click_count to the axis event leaves the possibility of defining discrete units for finger/continuous scroll sources in the future. Right now, these will always reuturn 0. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src

Re: [PATCH libinput] Add libinput_event_pointer_get_axis_click_count() to count wheel clicks

2015-01-13 Thread Peter Hutterer
On Tue, Jan 13, 2015 at 03:12:24PM +0800, Jonas Ådahl wrote: On Tue, Jan 13, 2015 at 03:21:24PM +1000, Peter Hutterer wrote: The recent normalization of wheel events means we get the angle in degrees but we don't know how this corresponds to clicks. The M325 has a 20 degree click angle

[PATCH libinput] tablet: drop LIBINPUT_TABLET_AXIS_NONE from the API

2015-02-09 Thread Peter Hutterer
. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- This one is for the tablet-support branch. src/evdev-tablet.c | 8 +--- src/evdev-tablet.h | 8 +--- src/libinput-private.h | 4 ++-- src/libinput.c | 4 ++-- src/libinput.h | 13 ++--- 5

[PATCH libinput 0/3] Automatic device group assignment

2015-02-09 Thread Peter Hutterer
This patchset assigns wacom devices into the same device group. libinput itself doesn't do the guesswork here, it's done in the udev rule through LIBINPUT_DEVICE_GROUP. libinput just uses that value to strcmp() and auto-assign the groups. The udev rule is a bit of a hackjob but it does the job

[PATCH libinput 3/3] Use LIBINPUT_DEVICE_GROUP from udev as group identifier

2015-02-09 Thread Peter Hutterer
From: Benjamin Tissoires benjamin.tissoi...@gmail.com Store it as identifier in the device group, any two devices that have a the same non-NULL identifier share the group. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- doc/device-configuration-via-udev.dox | 5 + src/evdev.c

[PATCH libinput 2/3] Add a rules file to assign LIBINPUT_DEVICE_GROUP

2015-02-09 Thread Peter Hutterer
Ideally we could just take ATTRS{phys} but we can't select substrings to drop into ENV so we re-assemble it manually. Eventually this will likely end up in a RUN callout, but for now this will do. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Makefile.am| 2

[PATCH libinput 1/3] tools: print the device group in event-debug

2015-02-09 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- tools/event-debug.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/event-debug.c b/tools/event-debug.c index 297e47d..38a6e82 100644 --- a/tools/event-debug.c +++ b/tools/event-debug.c

Re: [PATCH libinput] Add libinput_device_pointer_has_button over the plain has_button

2015-02-13 Thread Peter Hutterer
by the device group. Cheers, Peter On 02/13/2015 10:45 AM, Bill Spitzak wrote: Why not just say that is what libinput_device_has_button does in case there is an ambiguity? On 02/12/2015 08:43 PM, Peter Hutterer wrote: If a device has multiple capabilities, has_button is imprecise. A device

Re: [PATCH libinput] Add libinput_device_pointer_has_button over the plain has_button

2015-02-13 Thread Peter Hutterer
On 14/02/2015 11:17 , Bill Spitzak wrote: On 02/13/2015 04:46 PM, Peter Hutterer wrote: On 14/02/2015 05:00 , Bill Spitzak wrote: Actually, more to the point, it sounds like the client is unable to distinguish the BTN_LEFT produced by the pointer from the BTN_LEFT produced by the pad

Re: [PATCH libinput] Tablet: Remove leftover-comment

2015-02-15 Thread Peter Hutterer
On Sun, Feb 15, 2015 at 07:06:34PM -0500, Stephen Chandler Paul wrote: Signed-off-by: Stephen Chandler Paul thatsly...@gmail.com --- src/evdev-tablet.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index f80d642..fe09efc

Re: [RFC libinput 1/2] Add a buttonset interface for button-only devices

2015-02-15 Thread Peter Hutterer
On Fri, Feb 13, 2015 at 09:34:52AM +0100, Hans de Goede wrote: Hi Peter, On 13-02-15 08:42, Peter Hutterer wrote: On 13/02/2015 14:32 , Peter Hutterer wrote: On Thu, Feb 12, 2015 at 12:37:12PM +0100, Hans de Goede wrote: Hi, On 12-02-15 08:33, Peter Hutterer wrote: A generic interface

[PATCH libinput] Introduce device groups to group logical devices together

2015-02-04 Thread Peter Hutterer
creates a new group for each new device. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Many thanks to Jonas, Hans, Benjamin for making me realise that merged device won't work. Also, this obsoletes the patchset for capability events as well as the get_udev_devices() patch src

Re: [PATCH wayland-web] Update ubuntu12.04 instructions to build expat from source

2015-02-04 Thread Peter Hutterer
On Tue, Feb 03, 2015 at 02:58:57PM -0800, Bill Spitzak wrote: This git repository was the best one I found. Even then the instructions seem to be wrong, there was no buildconf script and the execute bit was not turned on for configure. This seems to work and I confirmed that the output of

Re: [PATCH] libinput-seat: Don't regard no input devices as failure

2015-01-04 Thread Peter Hutterer
On Tue, Dec 30, 2014 at 05:19:45PM +, Daniel Stone wrote: Hi, On 29 December 2014 at 00:03, Peter Hutterer peter.hutte...@who-t.net wrote: On Sun, Dec 28, 2014 at 11:25:16PM +0100, Sjoerd Simons wrote: The reason for not having any input devices could actually

Re: [PATCH] libinput-seat: Don't regard no input devices as failure

2015-01-04 Thread Peter Hutterer
On Fri, Jan 02, 2015 at 02:22:04PM +0100, Sjoerd Simons wrote: On Fri, 2015-01-02 at 13:07 +, Daniel Stone wrote: Hi, On 2 January 2015 at 12:24, Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: Under the assumption that weston-launch is a tool for developers to start

Re: [PATCH libinput] tools: switch signal handler in event-debug

2015-01-07 Thread Peter Hutterer
On Thu, Jan 08, 2015 at 10:55:30AM +0800, Jonas Ådahl wrote: On Thu, Jan 08, 2015 at 10:05:34AM +1000, Peter Hutterer wrote: Under gdb, signalfd will still deliver the signal when gdb itself is interrupted and quit event-debug. For a debugging tool, that's not optimal. Switch to a normal

[PATCH libinput 2/2] Add libinput_event_pointer_has_axis to scroll events

2015-01-04 Thread Peter Hutterer
as a vertical-only or horizontal-only event. Note: intentionally done as a separate patch to the previous one to aid review and debugging. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad-edge-scroll.c | 3 +++ src/evdev.c | 17

[PATCH libinput 1/2] Change axis events to carry all directions

2015-01-04 Thread Peter Hutterer
contain multiple axes simultaneously. This is an API and ABI break. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad-edge-scroll.c | 21 --- src/evdev.c | 53 ++--- src/libinput-private.h

[PATCH libinput] tools: switch signal handler in event-debug

2015-01-07 Thread Peter Hutterer
Under gdb, signalfd will still deliver the signal when gdb itself is interrupted and quit event-debug. For a debugging tool, that's not optimal. Switch to a normal signal handler instead, signalfd is overkill here anyway. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- tools/event

Re: [PATCH libinput v2 8/8] tablet: Add tests for axes on proximity events

2015-02-18 Thread Peter Hutterer
On Wed, Feb 18, 2015 at 01:43:21AM -0500, Stephen Chandler Paul wrote: --- test/tablet.c | 134 ++ 1 file changed, 134 insertions(+) merged, thanks Cheers, Peter Changes - Check that the

Re: [RFC libinput 1/2] Add a buttonset interface for button-only devices

2015-02-18 Thread Peter Hutterer
On Wed, Feb 18, 2015 at 01:57:17PM -0800, Jason Gerecke wrote: On 2/16/2015 9:11 PM, Peter Hutterer wrote: On Mon, Feb 16, 2015 at 08:13:01AM +0100, Hans de Goede wrote: Hi, On 16-02-15 04:50, Peter Hutterer wrote: snip ok, I've played around with the ideas in this thread

Re: [PATCH libinput 04/11] touchpad: Change how we deal with scroll methods

2015-02-19 Thread Peter Hutterer
On Wed, Feb 18, 2015 at 01:26:47PM +0100, Hans de Goede wrote: With the upcoming gesture support 2fg scrolling will be handled as part of the main gesture state machine, where as edge scrolling has its own state typo: whereas Cheers, Peter machine, our current way of dispatching scroll

Re: [PATCH libinput 00/15] tablet: support the remaining tools

2015-02-19 Thread Peter Hutterer
On Thu, Feb 19, 2015 at 05:35:38PM -0800, Jason Gerecke wrote: On 2/17/2015 9:45 PM, Peter Hutterer wrote: This patchset adds the remaining tools to the tablet branch (at least for Wacom tools). The notable additions are: * rotation support for mouse/lens cursor * rotation support

Re: [PATCH libinput 00/12] typesafe coordinate wrappers

2015-03-16 Thread Peter Hutterer
On Mon, Mar 16, 2015 at 12:40:20PM +0100, Hans de Goede wrote: Hi Peter, On 12-03-15 09:36, Peter Hutterer wrote: libinput has two types of coordinates - device coordinates and coordinates normalized into the 1000 dpi default. we generally use int/double for those two, but it's not always

Re: [RFC v2 libinput 0/2] Buttonset interface - numbered axes

2015-03-22 Thread Peter Hutterer
On Fri, Mar 20, 2015 at 09:54:30AM +0100, Hans de Goede wrote: Hi, On 20-03-15 01:38, Peter Hutterer wrote: On Fri, Mar 20, 2015 at 10:19:06AM +1000, Peter Hutterer wrote: [...] 5) If a device has multiple axes of the same type, is the order supposed to be ABI? Example: gamepads tend

[PATCH libinput 9/9] evdev: factor out setting up the MT slots/mtdev

2015-03-16 Thread Peter Hutterer
No functional changes Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 100 ++-- 1 file changed, 57 insertions(+), 43 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index d9860b1..284aa1f 100644 --- a/src

[PATCH libinput 8/9] touchpad: parse the TOUCHPAD_RESOLUTION property

2015-03-16 Thread Peter Hutterer
Not all touchpad kernel drivers supply the x/y resolution. Let the udev hwdb fix this up where possible and read the value from it. This is intentionally only used on touchpads, touchscreen devices without resolution should be considered buggy and fixed in the kernel. Signed-off-by: Peter

[PATCH libinput 1/9] touchpad: simplify resolution check

2015-03-16 Thread Peter Hutterer
The struct evdev_device's absinfo_x/y point to the right axis Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev-mt-touchpad.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index a932287

[PATCH libinput 5/9] evdev: don't try to fix abs devices without x/y

2015-03-16 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evdev.c b/src/evdev.c index 3481b45..570c436 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1490,7 +1490,8 @@ evdev_configure_device(struct evdev_device

[PATCH libinput 6/9] Push the touchpad magic slowdown to the touchpad accel code

2015-03-16 Thread Peter Hutterer
to the default denominator for guessing a resolution based on the touchpad diagonal. We can't really get around this without having a resolution from the touchpad; meanwhile this produces virtually the same coordinates before/after. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src

Re: [RFC libinput 2/2] touchpad: Implement pinch gesture support (wip)

2015-03-16 Thread Peter Hutterer
On Mon, Mar 16, 2015 at 02:58:02PM +0100, Hans de Goede wrote: Hi, On 12-03-15 09:23, Peter Hutterer wrote: On Wed, Mar 11, 2015 at 03:20:55PM +0100, Hans de Goede wrote: Implement touchpad pinch (and rotate) gesture support. WIP: TODO: fix testsuite. Signed-off-by: Hans de Goede hdego

[PATCH libinput 7/9] evdev: refactor fake resolution setting

2015-03-16 Thread Peter Hutterer
for the resolution. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 103 +++- src/evdev.h | 9 ++ 2 files changed, 76 insertions(+), 36 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index ff7bc37..d9860b1

[PATCH libinput 3/9] evdev: fix android MT devices

2015-03-16 Thread Peter Hutterer
These devices don't provide ABS_X/Y, but do have proper multitouch. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 20 1 file changed, 20 insertions(+) diff --git a/src/evdev.c b/src/evdev.c index c661af9..ea63356 100644 --- a/src/evdev.c +++ b/src

<    4   5   6   7   8   9   10   11   12   13   >