Re: [PATCH libinput] evdev: replace null sentinel with ARRAY_SIZE

2017-05-10 Thread Peter Hutterer
On Wed, May 10, 2017 at 11:13:07AM +0100, Eric Engestrom wrote: > Signed-off-by: Eric Engestrom > --- > src/evdev.c | 17 +++-- > 1 file changed, 7 insertions(+), 10 deletions(-) > > diff --git a/src/evdev.c b/src/evdev.c > index a2be6fc..7895644 100644 >

Westfield - Wayland HTML5 Browser IPC

2017-05-10 Thread Erik De Rijcke
I had this lying around for some time but realized I never really announced it on the ML, so here it is! https://github.com/udevbe/westfield So what is it? Westfield is wayland protocol xml parser and generator for Javascript, much like what libwayland is for C. It's nearly fully compatible on

Re: [PATCH libinput] evdev: replace null sentinel with ARRAY_SIZE

2017-05-10 Thread Eric Engestrom
On Wednesday, 2017-05-10 17:25:04 +0200, Jan Engelhardt wrote: > > On Wednesday 2017-05-10 17:20, Dima Ryazanov wrote: > > +#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a)[0]) > > > > > >I'm guessing this works, but "sizeof(a)[0]" looks very unintuitive to me. I > >think "sizeof(a[0])" is > >the

Re: [PATCH libinput] evdev: replace null sentinel with ARRAY_SIZE

2017-05-10 Thread Jan Engelhardt
On Wednesday 2017-05-10 17:20, Dima Ryazanov wrote: > +#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a)[0]) > > >I'm guessing this works, but "sizeof(a)[0]" looks very unintuitive to me. I >think "sizeof(a[0])" is >the convention? If going with the sizeof(T) syntax, then the answer would be

Re: [PATCH libinput] evdev: replace null sentinel with ARRAY_SIZE

2017-05-10 Thread Dima Ryazanov
On May 10, 2017 7:14 AM, "Eric Engestrom" wrote: Signed-off-by: Eric Engestrom --- src/evdev.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index a2be6fc..7895644 100644

Re: [PATCH libinput 1/5] util: drop GCC specifics for container_of

2017-05-10 Thread Gabriel Laskar
On Wed, May 10, 2017 at 01:47:56PM +1000, Peter Hutterer wrote: > clang supports __typeof__ which was the only real difference. Not sure any > other compilers matter (that don't support __typeof__) > > Signed-off-by: Peter Hutterer > --- > src/libinput-util.h | 6

[PATCH libinput] libinput: rewrite loop to make it more readable

2017-05-10 Thread Eric Engestrom
Rewrite foo(); while(...) { foo(); } into do { foo(); } while(...); to avoid duplication and make the flow easier to read and understand. Signed-off-by: Eric Engestrom --- src/libinput.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH libinput 1/5] util: drop GCC specifics for container_of

2017-05-10 Thread Armin Krezović
On 10.05.2017 05:47, Peter Hutterer wrote: > clang supports __typeof__ which was the only real difference. Not sure any > other compilers matter (that don't support __typeof__) > Hi, Fun fact: Clang defines __GNUC__ because it's gcc compatible and the gcc path was always used by clang, the

Re: [PATCH libinput 5/5] evdev: fix a compiler warning about a missing field initializer

2017-05-10 Thread Eric Engestrom
On Wednesday, 2017-05-10 13:48:00 +1000, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer This series is Reviewed-by: Eric Engestrom > --- > src/evdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH libinput] touchpad: pull the tap exclusion zone down to the full edge zone

2017-05-10 Thread Hans de Goede
Hi, On 10-05-17 04:21, Peter Hutterer wrote: This was originally left outside of the button areas in case users tap in those zones, but we're getting false tap events in that zone. On a 100mm touchpad, the edge zone is merely 5mm, it's acceptable to ignore taps in that area even in the