Re: [RFC PATCH wayland] protocol: add wl_pointer.axis_frame events

2015-06-03 Thread Peter Hutterer
On Thu, Jun 04, 2015 at 01:49:26PM +0800, Jonas Ådahl wrote: > On Thu, Jun 04, 2015 at 03:28:15PM +1000, Peter Hutterer wrote: > > On Thu, Jun 04, 2015 at 01:09:06PM +0800, Jonas Ådahl wrote: > > > On Thu, Jun 04, 2015 at 02:41:52PM +1000, Peter Hutterer wrote: > > > > To group separate vertical/ho

Re: [RFC PATCH v3 wayland] protocol: add wl_pointer.axis_source, axis_stop and axis_discrete events

2015-06-03 Thread Peter Hutterer
On Thu, Jun 04, 2015 at 01:44:11PM +0800, Jonas Ådahl wrote: > On Wed, Jun 03, 2015 at 03:18:44PM +1000, Peter Hutterer wrote: > > On Tue, Jun 02, 2015 at 04:06:23PM +0800, Jonas Ådahl wrote: > > > Hi, > > > > > > > > > I think this looks pretty decent now. Currently I have no more issues > > > w

Re: [RFC PATCH wayland] protocol: add wl_pointer.axis_frame events

2015-06-03 Thread Jonas Ådahl
On Thu, Jun 04, 2015 at 03:28:15PM +1000, Peter Hutterer wrote: > On Thu, Jun 04, 2015 at 01:09:06PM +0800, Jonas Ådahl wrote: > > On Thu, Jun 04, 2015 at 02:41:52PM +1000, Peter Hutterer wrote: > > > To group separate vertical/horizontal scroll events together. Likewise it > > > enables axis_stop

Re: [RFC PATCH v3 wayland] protocol: add wl_pointer.axis_source, axis_stop and axis_discrete events

2015-06-03 Thread Jonas Ådahl
On Wed, Jun 03, 2015 at 03:18:44PM +1000, Peter Hutterer wrote: > On Tue, Jun 02, 2015 at 04:06:23PM +0800, Jonas Ådahl wrote: > > Hi, > > > > > > I think this looks pretty decent now. Currently I have no more issues > > with the protocol, only minor nits and comments on wording etc. that can > >

Re: [RFC PATCH wayland] protocol: add wl_pointer.axis_frame events

2015-06-03 Thread Peter Hutterer
On Thu, Jun 04, 2015 at 01:09:06PM +0800, Jonas Ådahl wrote: > On Thu, Jun 04, 2015 at 02:41:52PM +1000, Peter Hutterer wrote: > > To group separate vertical/horizontal scroll events together. Likewise it > > enables axis_stop events to be grouped so that the final vector for kinetic > > scrolling

Re: [RFC PATCH wayland] protocol: add wl_pointer.axis_frame events

2015-06-03 Thread Jonas Ådahl
On Thu, Jun 04, 2015 at 02:41:52PM +1000, Peter Hutterer wrote: > To group separate vertical/horizontal scroll events together. Likewise it > enables axis_stop events to be grouped so that the final vector for kinetic > scrolling may be calculated correctly. > > Multiple scroll sources within the

[RFC PATCH wayland] protocol: add wl_pointer.axis_frame events

2015-06-03 Thread Peter Hutterer
To group separate vertical/horizontal scroll events together. Likewise it enables axis_stop events to be grouped so that the final vector for kinetic scrolling may be calculated correctly. Multiple scroll sources within the same frame is not expected, but the protocol allows this use-case, i.e. ax

Re: Compositor grabs (was: Re: [PATCH] protocol: Add DnD actions)

2015-06-03 Thread Jonas Ådahl
On Fri, Apr 17, 2015 at 02:16:41PM +0200, Carlos Garnacho wrote: > Hey Jonas, > > This is drifting a bit off the topic of the original thread, better to > spin this off. I'll reply to the DnD bits in another email. Hey, sorry for the delay. Some comments/questions below. > > On Fri, Apr 17, 201

[ANNOUNCE] libinput 0.17.0

2015-06-03 Thread Peter Hutterer
A new release of libinput, 0.17.0, is now available. This comes quite soon after the 0.16 but it fixes three rather prominent issues. These three fixes are: The timeout for the tap-and-drag has been significantly reduced. Users reported the previous timeout to feel quite laggy and broken, the n

Re: [PATCH weston v2 01/21] input: Pass axis events through pointer grab interfaces

2015-06-03 Thread Derek Foreman
On 13/05/15 05:26 AM, Jonas Ådahl wrote: > Don't only send motions and buttons but also axis events through the > pointer grab interface. > > Signed-off-by: Jonas Ådahl This looks good to me. The zoom binding still works, and the default grab handler is called appropriately, scrolling in a west

Re: [PATCH weston 3/3] launcher-logind: Remove old VT switching code, move to SwitchTo/Activate

2015-06-03 Thread Derek Foreman
FWIW, this whole series looks like a reasonable idea to me, and I'll give it a review/test if you feel like rebasing it... For this patch in particular, do we need to change our system version requirements in configure.ac to be sure we have the new APIs? On 18/03/15 10:04 PM, Jasper St. Pierre wr

[PATCH weston 05/19] bindings: Stop exporting internal functions

2015-06-03 Thread Derek Foreman
These functions should never be called outside of the core. Signed-off-by: Derek Foreman --- src/bindings.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bindings.c b/src/bindings.c index 6aeed91..71a982c 100644 --- a/src/bindings.c +++ b/src/bindings.c @

[PATCH weston 16/19] desktop-shell: Use the grabbed pointer in popup_grab_button

2015-06-03 Thread Derek Foreman
This should be identical to the pointer in shset->seat. A later patch prevents direct access to seat->pointer, using the known valid pointer in the grab will be nicer than using the getter functions that patch introduces. Signed-off-by: Derek Foreman --- desktop-shell/shell.c | 2 +- 1 file cha

[PATCH weston 11/19] input: Pass the appropriate pointer type to bindings instead of a seat

2015-06-03 Thread Derek Foreman
Normally we need to check if a seat's [device_type]_count is > 0 before we can use the associated pointer. However, in a binding you're guaranteed that the seat has a device of that type. If we pass in that type instead of the seat, it's obvious we don't have to test it. The bindings can still g

[PATCH v6 weston 19/19] input: Don't test keyboard/pointer/touch pointers

2015-06-03 Thread Derek Foreman
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 after removing a device than we had before it was inserted. This commit r

[PATCH weston 14/19] desktop-shell: Make surface_rotate take a pointer instead of a seat

2015-06-03 Thread Derek Foreman
It doesn't actually need the seat and we have to validate that the seat has a pointer before making the call, so it's safer just to pass the validated pointer. Signed-off-by: Derek Foreman --- desktop-shell/shell.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH weston 01/19] text-backend: Replace focus_listener_initialized with a bool

2015-06-03 Thread Derek Foreman
Signed-off-by: Derek Foreman --- src/text-backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/text-backend.c b/src/text-backend.c index daae03c..de170e8 100644 --- a/src/text-backend.c +++ b/src/text-backend.c @@ -75,7 +75,7 @@ struct input_method { s

[PATCH weston 18/19] bindings: Make run binding functions take apropriate device instead of a seat

2015-06-03 Thread Derek Foreman
Going from seat to input device requires that we test the device before relying on the pointer. In all of these binding functions we can trust exactly one input device type directly. If we pass that in instead of a seat it's more obvious that we can trust the one pointer we have. When a seat is

[PATCH weston 13/19] desktop-shell: Make surface_move take a pointer instead of a seat

2015-06-03 Thread Derek Foreman
It doesn't actually need the seat and we have to validate that the seat has a pointer before making the call, so it's safer just to pass the validated pointer. Signed-off-by: Derek Foreman --- desktop-shell/shell.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff

[PATCH weston 12/19] desktop-shell: Make surface_touch_move take a touch instead of a seat

2015-06-03 Thread Derek Foreman
It never actually needs the seat, and we always verify the touch pointer before calling it, so let's just pass a touch pointer instead of having an assumption that the seat's touch pointer has been verified. Signed-off-by: Derek Foreman --- desktop-shell/shell.c | 12 ++-- 1 file changed

[PATCH weston 15/19] desktop-shell: Make surface_resize take a pointer instead of a seat

2015-06-03 Thread Derek Foreman
It doesn't actually need the seat and we have to validate that the seat has a pointer before making the call, so it's safer just to pass the validated pointer. Signed-off-by: Derek Foreman --- desktop-shell/shell.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff -

[PATCH weston 17/19] bindings: make install_binding_grab take a keyboard instead of a seat

2015-06-03 Thread Derek Foreman
It doesn't need the seat pointer, and the caller should already have tested that the keyboard pointer is valid. Signed-off-by: Derek Foreman --- src/bindings.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/bindings.c b/src/bindings.c index 31dcd63..4f

[PATCH weston 00/19] Don't allow direct use of seat->device pointers

2015-06-03 Thread Derek Foreman
I guess this is v6 of my Don't test keyboard/pointer/touch pointers patch. I've tried to simplify the monster patch at the end by doing clean-up in the earlier patches, the ultimate goal being to stop most code from directly accessing seat->touch, seat->keyboard and seat->pointer. Those pointers

[PATCH weston 09/19] input: clean up seat_get_keyboard a little

2015-06-03 Thread Derek Foreman
We already have a pointer to the keyboard, so we can change all seat->keyboard to keyboard Signed-off-by: Derek Foreman --- src/input.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/input.c b/src/input.c index f8f19f7..dee3ca9 100644 --- a/src/i

[PATCH weston 07/19] input: clean up notify_modifiers a little

2015-06-03 Thread Derek Foreman
We already have a pointer to the keyboard, so we can change all seat->keyboard to keyboard. Signed-off-by: Derek Foreman --- src/input.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/input.c b/src/input.c index c56de70..8350d22 100644 --- a/src/input.

[PATCH weston 08/19] input: clean up update_keymap a little

2015-06-03 Thread Derek Foreman
We already have a pointer to the keyboard, so we can change all seat->keyboard to keyboard. Signed-off-by: Derek Foreman --- src/input.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/input.c b/src/input.c index 8350d22..f8f19f7 100644 --- a/src/input.c +++

[PATCH weston 02/19] exposay: Test keyboard presence before using keyboard pointer

2015-06-03 Thread Derek Foreman
We shouldn't actually use the keyboard pointer unless we check that a keyboard is present. Signed-off-by: Derek Foreman --- desktop-shell/exposay.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c index 78e45fb..4916b39 10

[PATCH weston 03/19] desktop-shell: make client_initiated a bool

2015-06-03 Thread Derek Foreman
Make it a bool in both surface_move() and struct weston_move_grab Signed-off-by: Derek Foreman --- desktop-shell/shell.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index fe620cb..57511d2 100644 --- a/desktop-shel

[PATCH weston 04/19] input: minor clean up in weston_seat_repick()

2015-06-03 Thread Derek Foreman
Signed-off-by: Derek Foreman --- src/input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input.c b/src/input.c index 6604c5d..c56de70 100644 --- a/src/input.c +++ b/src/input.c @@ -51,10 +51,10 @@ weston_seat_repick(struct weston_seat *seat) { const struct

[PATCH weston 10/19] screenshooter: clean up recorder_binding a little

2015-06-03 Thread Derek Foreman
We already have a pointer to the compositor so change seat->compositor to ec Signed-off-by: Derek Foreman --- src/screenshooter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screenshooter.c b/src/screenshooter.c index 4e32db5..fc648a1 100644 --- a/src/screenshooter.c

[PATCH weston 06/19] compositor-drm: Simplify logic in setup_output_seat_constraint

2015-06-03 Thread Derek Foreman
Use early return for a slight simplification. Signed-off-by: Derek Foreman --- src/compositor-drm.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index bf921be..b13e0c0 100644 --- a/src/compositor-drm.c +++ b/src/composito

Re: [RFC PATCH v3 wayland] protocol: add wl_pointer.axis_source, axis_stop and axis_discrete events

2015-06-03 Thread Carlos Garnacho
Hey :), The protocol looks quite nice to me, only one nit below: On Thu, May 7, 2015 at 7:54 AM, Peter Hutterer wrote: > + > + > +Scroll and other axis stop notification. > + > +For some wl_pointer.axis_source types, a wl_pointer.axis_stop event > +is sent to

Re: [PATCH libinput 4/4] touchpad: on non-resolution touchpads, use 30% as maximum clickfinger spread

2015-06-03 Thread Hans de Goede
Hi, On 03-06-15 07:51, Peter Hutterer wrote: Signed-off-by: Peter Hutterer LGTM: Reviewed-by: Hans de Goede Regards, Hans --- src/evdev-mt-touchpad-buttons.c | 35 +++ test/touchpad.c | 2 +- 2 files changed, 24 insertions(+), 13 delet

Re: [PATCH libinput 3/4] touchpad: impose maximum distance limits on clickfingers

2015-06-03 Thread Hans de Goede
Hi, On 03-06-15 07:51, Peter Hutterer wrote: A common use-case for clickfinger is to use the index finger for moving the pointer, then triggering the click with a thumb. If the index finger isn't lifted before the click this counted as two-finger click. To avoid this, check the distance between

Re: [PATCH libinput 2/4] touchpad: move clickfinger finger decision into a helper function

2015-06-03 Thread Hans de Goede
Hi, On 03-06-15 07:51, Peter Hutterer wrote: No functional changes. Signed-off-by: Peter Hutterer LGTM: Reviewed-by: Hans de Goede Regards, Hans --- src/evdev-mt-touchpad-buttons.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/ev

Re: [PATCH libinput 1/4] touchpad: replace hardcoded resolution > 1

2015-06-03 Thread Hans de Goede
Hi, On 03-06-15 07:51, Peter Hutterer wrote: Signed-off-by: Peter Hutterer LGTM: Reviewed-by: Hans de Goede Regards, Hans --- src/evdev-mt-touchpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index aa9fa57..24