[PATCH libinput 1/6] test: move the helper functions to the litest.h file

2015-07-29 Thread Peter Hutterer
To avoid duplication Signed-off-by: Peter Hutterer --- test/litest.h | 93 ++ test/touchpad-buttons.c | 72 +++- test/touchpad-tap.c | 40 +++ test/touchpad.c | 171 +++- 4 files

[PATCH libinput 5/6] touchpad: elantech touchpads can use a 2mm gesture motion threshold

2015-07-29 Thread Peter Hutterer
Unlike ALPS and Synaptics semi-mt touchpads, the Elantech touchpads appear to be precise enough to allow a smaller motion threshold before we decide on the type of gesture (pinch vs scroll). https://bugs.freedesktop.org/show_bug.cgi?id=91475 Signed-off-by: Peter Hutterer --- src/evdev-mt-touchp

[PATCH libinput 6/6] touchpad: pretend the jumpy semi-mt touchpad is a single-touch touchpad

2015-07-29 Thread Peter Hutterer
The first finger is accurate, it's just the second finger that is imprecise, so we can't handle it as a true touch. Instead, revert the device back to being a single-touch touchpad and use the fake touch bits for second finger handling. Two-finger scrolling thus becomes usable though we will lose

[PATCH libinput 4/6] touchpad: disable gestures on Synaptics semi-mt touchpads

2015-07-29 Thread Peter Hutterer
Follow-up to eb146677e, if we disable 2fg scrolling on those touchpads we should also disable gestures. The data doesn't magically become more useful. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad-gestures.c | 6 +- test/gestures.c | 8 ++-- 2 files changed, 11

[PATCH libinput 3/6] touchpad: make gestures optional

2015-07-29 Thread Peter Hutterer
Not all multi-finger touchpads are able to reliably produce gestures, so make it optional. This patch just adds a boolean (currently always true) that gets set on touchpad init time, i.e. it is not run-time configurable. Three and four-finger gestures are filtered out in gesture_notify(), if the c

[PATCH libinput 2/6] touchpad: move CAP_GESTURE assignment to the touchpad code

2015-07-29 Thread Peter Hutterer
That's where we set the pointer cap too. No functional changes. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 1 + src/evdev.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index ee1612e..e110b9a 10

Re: [PATCH? weston] - wayland backend: outputs are destroyed twice

2015-07-29 Thread Ryo Munakata
On 07/29, Dawid Gajownik wrote: Hi Dawid. > Hi, > > in src/compositor-wayland.c:wayland_backend_destroy() you can find this code: > > struct weston_output *output, *next; > > wl_list_for_each_safe(output, next, &b->compositor->output_list, link) > wayland_output

Re: [PATCH wayland v2 1/2] scanner: refactor creating objects

2015-07-29 Thread Bryce Harrington
On Mon, Jul 27, 2015 at 09:17:15AM +0200, Marek Chalupa wrote: > Hi, > thanks for review. > > On 07/23/2015 08:41 PM, Bryce Harrington wrote: > >On Thu, Jul 23, 2015 at 07:39:30AM +0200, Marek Chalupa wrote: > >>wrap creating and initializing objects (structures) > >>into functions and use them in

Re: [PATCH v2 weston] zoom: Store the seat that initiated a zoom

2015-07-29 Thread Bryce Harrington
On Mon, Jul 27, 2015 at 01:09:34PM -0500, Derek Foreman wrote: > Track the seat that initiated a zoom instead of picking the first one. > > Previously, if there are multiple seats then any seat can adjust the zoom > level but the zoom tracks the first seat's pointer. > > Now the zoom will follow

Re: [PATCH weston v2 3/5] compositor: Emit wl_pointer_gesture_* events on libinput gesture events

2015-07-29 Thread Peter Hutterer
On Thu, Jul 30, 2015 at 10:10:45AM +0800, Jonas Ådahl wrote: > On Wed, Jul 29, 2015 at 06:38:10PM -0700, Bill Spitzak wrote: > > On Wed, Jul 29, 2015 at 6:02 PM, Jonas Ådahl wrote: > > > > > > > > We are not going to just provide libinput events via Wayland. It simply > > > doesn't work. Also the

Re: [PATCH v2 weston 2/4] zoom: Call weston_output_activate_zoom() appropriately

2015-07-29 Thread Bryce Harrington
On Mon, Jul 27, 2015 at 01:03:37PM -0500, Derek Foreman wrote: > On 23/07/15 07:02 PM, Bryce Harrington wrote: > > On Thu, Jul 23, 2015 at 02:55:13PM -0500, Derek Foreman wrote: > >> No longer call weston_output_update_zoom() when trying to zoom out > >> on an unzoomed output. > >> > >> Add an asse

Re: [PATCH v2 weston 3/4] zoom: Rename zoom_area_center_from_pointer to zoom_area_center_from_point

2015-07-29 Thread Bryce Harrington
On Thu, Jul 23, 2015 at 05:53:40PM -0700, Bryce Harrington wrote: > On Thu, Jul 23, 2015 at 02:55:14PM -0500, Derek Foreman wrote: > > It doesn't do anything with a pointer, and zoom can be initiated by the > > keyboard, so the name was a little confusing. > > > > Signed-off-by: Derek Foreman >

Re: [PATCH v2 weston 1/4] zoom: Change zoom->active to a bool

2015-07-29 Thread Bryce Harrington
On Thu, Jul 23, 2015 at 03:44:35PM -0700, Bryce Harrington wrote: > On Thu, Jul 23, 2015 at 02:55:12PM -0500, Derek Foreman wrote: > > Signed-off-by: Derek Foreman > > Reviewed-by: Bryce Harrington To ssh://git.freedesktop.org/git/wayland/weston b3463a9..a36eb50 master -> master > > ---

[RFC wayland 1/2] doc: Add a paragraph about the object creation guarantee

2015-07-29 Thread Jonas Ådahl
One of the principles of the Wayland protocol is that object creation always succeeds. If the server for some reason cannot create a valid object as a response to some request, this would typically be caused by a protocol violation and in such cases the server will terminate the client with an erro

[RFC wayland 2/2] protocol: Don't silently fail to create seat device objects

2015-07-29 Thread Jonas Ådahl
One of the principles of Wayland is that object creation never fails. If the object cannot be created, it should be reported as a protocol error and an offending client should be terminated. A current violation to this principle is the input device creation in wl_seat, as it may silently ignore a

Re: [PATCH weston v2 3/5] compositor: Emit wl_pointer_gesture_* events on libinput gesture events

2015-07-29 Thread Jonas Ådahl
On Wed, Jul 29, 2015 at 06:38:10PM -0700, Bill Spitzak wrote: > On Wed, Jul 29, 2015 at 6:02 PM, Jonas Ådahl wrote: > > > > > We are not going to just provide libinput events via Wayland. It simply > > doesn't work. Also the Wayland protocol is different and needs to be > > different because it h

Re: [PATCH v7 weston 17/17] input: Don't test keyboard/pointer/touch pointers

2015-07-29 Thread Jonas Ådahl
On Wed, Jul 15, 2015 at 01:00:48PM -0500, Derek Foreman wrote: > Keyboards and pointers aren't freed when devices are removed, so we should > really be testing keyboard_device_count and pointer_device_count in most > cases, not the actual pointers. Otherwise we end up with different > behaviour aft

Re: [PATCH weston v2 3/5] compositor: Emit wl_pointer_gesture_* events on libinput gesture events

2015-07-29 Thread Bill Spitzak
On Wed, Jul 29, 2015 at 6:02 PM, Jonas Ådahl wrote: > > We are not going to just provide libinput events via Wayland. It simply > doesn't work. Also the Wayland protocol is different and needs to be > different because it has to deal with protocol objects, destruction etc. > What I meant is that

Re: [PATCH weston v2 3/5] compositor: Emit wl_pointer_gesture_* events on libinput gesture events

2015-07-29 Thread Jonas Ådahl
On Wed, Jul 29, 2015 at 10:38:11AM -0700, Bill Spitzak wrote: > On Tue, Jul 28, 2015 at 11:59 PM, Jonas Ådahl wrote: > > > On Thu, Jul 23, 2015 at 07:00:29PM +0200, Carlos Garnacho wrote: > > > The translation is fairly straightforward so far, it would be convenient > > > if gestures went through

[PATCH? weston] - wayland backend: outputs are destroyed twice

2015-07-29 Thread Dawid Gajownik
Hi, in src/compositor-wayland.c:wayland_backend_destroy() you can find this code: struct weston_output *output, *next; wl_list_for_each_safe(output, next, &b->compositor->output_list, link) wayland_output_destroy(output); [snip] weston_compositor_shutdown(

[PATCH] desktop-shell: fix bug referencing invalid surface list

2015-07-29 Thread Ryo Munakata
In shell_destroy_shell_surface, we remove the link of a shell_surface. There is a case which the link references shell_client::surface_list which is already free'd. Therefore we have to remove shell_client::surface_list when freeing a shell_client. Signed-off-by: Ryo Munakata --- desktop-shell/s

Re: [PATCH weston v2 3/5] compositor: Emit wl_pointer_gesture_* events on libinput gesture events

2015-07-29 Thread Bill Spitzak
On Tue, Jul 28, 2015 at 11:59 PM, Jonas Ådahl wrote: > On Thu, Jul 23, 2015 at 07:00:29PM +0200, Carlos Garnacho wrote: > > The translation is fairly straightforward so far, it would be convenient > > if gestures went through the pointer grab interface, but this is not done > > at the moment. >

Re: [PATCH libinput] gestures: check ntouches, not just num_slots for the number of fingers

2015-07-29 Thread Hans de Goede
Hi, On 29-07-15 11:53, Peter Hutterer wrote: We need to check fake fingers as well as real fingers, especially for two-finger scrolling on single-touch touchpads with BTN_TOOL_DOUBLETAP. https://bugzilla.redhat.com/show_bug.cgi?id=1246651 Signed-off-by: Peter Hutterer Ah, yes.: Reviewed-by

[PATCH libinput] gestures: check ntouches, not just num_slots for the number of fingers

2015-07-29 Thread Peter Hutterer
We need to check fake fingers as well as real fingers, especially for two-finger scrolling on single-touch touchpads with BTN_TOOL_DOUBLETAP. https://bugzilla.redhat.com/show_bug.cgi?id=1246651 Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad-gestures.c | 2 +- 1 file changed, 1 insertio

[PATCH wayland v2 1/2] Extend WAYLAND_DISPLAY and name parameter semantics to support absolute paths.

2015-07-29 Thread Davide Bettio
Extend WAYLAND_DISPLAY and name parameter semantics to support absolute paths. For example WAYLAND_DISPLAY="/my/path/wayland-2" or connect_to_socket("/my/path/wayland-2"). Signed-off-by: Davide Bettio --- doc/man/wl_display_connect.xml | 8 src/wayland-client.c | 22 ++

[PATCH wayland v2] Introduce WAYLAND_SERVER_SOCKET_DIR to change socket directory without changing XDG_RUNTIME_DIR.

2015-07-29 Thread Davide Bettio
Introduce WAYLAND_SERVER_SOCKET_DIR to change socket directory without changing XDG_RUNTIME_DIR. This might be useful to change socket directory in case wl_display_add_socket_auto is used. For example this will change the socket path for weston without using any command line argument. This envv

Re: [PATCH libinput] touchpad: drop distance threshold to detect pinches

2015-07-29 Thread Hans de Goede
Hi, On 29-07-15 01:12, Peter Hutterer wrote: This gives us too many false positives of 2fg scroll being detected as pinch gesture. Reporter in [1] uses index+ring finger and thus exceeds the distance easily (that's admittedly a special case). This is worsed by the lack of a client stack that ha

Re: [PATCH libinput 2/2] test: abort if we trigger a libinput bug message

2015-07-29 Thread Jonas Ådahl
On Wed, Jul 29, 2015 at 05:45:45PM +1000, Peter Hutterer wrote: > Only abort on client or libinput bugs, skip over kernel bugs. > > Signed-off-by: Peter Hutterer Both patches Reviewed-by: Jonas Ådahl Jonas > --- > test/litest.c | 4 > test/path.c | 2 ++ > 2 files changed, 6 inserti

[PATCH libinput 2/2] test: abort if we trigger a libinput bug message

2015-07-29 Thread Peter Hutterer
Only abort on client or libinput bugs, skip over kernel bugs. Signed-off-by: Peter Hutterer --- test/litest.c | 4 test/path.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/test/litest.c b/test/litest.c index 676485e..51085f1 100644 --- a/test/litest.c +++ b/test/litest.c @@ -777

[PATCH libinput 1/2] test: add missing libinput_dispatch() before timeouts

2015-07-29 Thread Peter Hutterer
see 5cec16eede70. Signed-off-by: Peter Hutterer --- test/touchpad-tap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c index c021f1d..f6986e7 100644 --- a/test/touchpad-tap.c +++ b/test/touchpad-tap.c @@ -806,6 +806,7 @@ START_TEST(touchpad_1fg_tap_

Re: [PATCH weston v2 5/5] clients: Add pointer gesture support to weston-eventdemo

2015-07-29 Thread Jonas Ådahl
On Thu, Jul 23, 2015 at 07:00:31PM +0200, Carlos Garnacho wrote: > Just print the output, as with the other events. > > Signed-off-by: Carlos Garnacho Another potential demonstration would be to use pinch gesture in image.c. It already have all the necessary functionaity so it would just be to p

Re: [PATCH weston v2 4/5] clients: Request the wl_pointer_gesture_swipe/pinch interfaces

2015-07-29 Thread Jonas Ådahl
On Thu, Jul 23, 2015 at 07:00:30PM +0200, Carlos Garnacho wrote: > This is accompanied by separate handlers for the different stages > of swipe/pinch gestures, so those can be set in demos. > > Signed-off-by: Carlos Garnacho > --- > Makefile.am | 2 + > clients/window.c | 209 > +

Re: [PATCH weston v2 3/5] compositor: Emit wl_pointer_gesture_* events on libinput gesture events

2015-07-29 Thread Jonas Ådahl
On Thu, Jul 23, 2015 at 07:00:29PM +0200, Carlos Garnacho wrote: > The translation is fairly straightforward so far, it would be convenient > if gestures went through the pointer grab interface, but this is not done > at the moment. > > Signed-off-by: Carlos Garnacho Oh, forgot to mention one th