Re: Stacking subsurface siblings

2015-06-19 Thread Bill Spitzak
On Thu, Jun 18, 2015 at 12:14 AM, Pekka Paalanen wrote: > > Arnaud's code: > > surf[BLUE] = surface_create(ctx, NULL, 100, 100, 0, 0, 0xffff); > if (!surf[BLUE]) > die("failed to create root surface"); > > surf[RED] = surface_create(ctx, surf[BLUE], 100

[PATCH weston] logind-util: Use %u for unsigned int in snprintf

2015-06-19 Thread Bryce Harrington
Addresses this warning found by Denis Denisov: [src/logind-util.c:702]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. Signed-off-by: Bryce Harrington --- src/logind-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src

Re: [PATCH] tests: Don't increment variables inside an assert()

2015-06-19 Thread Jon A. Cruz
On 06/19/2015 03:58 PM, Bryce Harrington wrote: > Addresses this warning found by Denis Denisov: > > [tests/array-test.c:137]: (warning) Assert statement modifies 'i'. > > Signed-off-by: Bryce Harrington > --- > tests/array-test.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(

[PATCH weston] clients: Simplify memory allocation with xzalloc()

2015-06-19 Thread Bryce Harrington
It is redundant to check x*alloc's return value for null pointers, since they are guaranteed to either return non-NULL or terminate the program. In cases where we memset the malloc'd memory to 0, we can more efficiently use the xzalloc() routine. zalloc looks for opportunities to return memory ch

[PATCH] tests: Don't increment variables inside an assert()

2015-06-19 Thread Bryce Harrington
Addresses this warning found by Denis Denisov: [tests/array-test.c:137]: (warning) Assert statement modifies 'i'. Signed-off-by: Bryce Harrington --- tests/array-test.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/array-test.c b/tests/array-test.c index 3

[PATCH] scanner: Close input resource when done to prevent leak

2015-06-19 Thread Bryce Harrington
Addresses this error reported by Denis Denisov: [src/scanner.c:1415]: (error) Resource leak: input Signed-off-by: Bryce Harrington --- src/scanner.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scanner.c b/src/scanner.c index 7d8cfb9..2843d85 100644 --- a/src/scanner.c +++ b/src/sc

[PATCH] weston-launch: Drop redundant exit()

2015-06-19 Thread Bryce Harrington
error(1, ...) already will exit, per man page: "If status has a nonzero value, then error() calls exit(3) to terminate the program using the given value as the exit status." So exit(EXIT_FAILURE) is never reached. The EXIT_FAILURE macro is guaranteed to be non-zero. Typically it's just 1, but on

[PATCH libinput v2 1/5] add axis_replacement from tablet branch

2015-06-19 Thread Andreas Pokorny
The optional axis_replacement provides additional replacement values for touch down and touch move litest functions. Signed-off-by: Andreas Pokorny --- test/litest.c | 59 --- test/litest.h | 16 2 files changed, 64 inserti

[PATCH libinput v2 3/5] litest: add mako style touch screen without orientation

2015-06-19 Thread Andreas Pokorny
This device provides a circular touch point size and and hence lacks orientation. It will be used to test default value handling. --- test/Makefile.am | 1 + test/litest-nexus4-touch-screen.c | 98 +++ test/litest.c | 2 +

[PATCH libinput v2 2/5] litest: add a generic multitouch screen

2015-06-19 Thread Andreas Pokorny
Adds a device with various touch related axes and respective device features to litest. And additional routines to simulate pressure orientation and touch major/minor changes. Signed-off-by: Andreas Pokorny --- test/Makefile.am | 1 + test/litest-touch-screen.c | 104

[PATCH libinput v2 0/5] add touch point properties to libinput_event_touch

2015-06-19 Thread Andreas Pokorny
Hi This is the second version, that should address all the review comments that I did not miss. Orientation is now in degrees against the x-axis. The scaling of major / minor diameter sizes is now done similar to x and y position. I had a look at how android does the scaling of those values, the

[PATCH libinput v2 4/5] litest: floating point comparison macros

2015-06-19 Thread Andreas Pokorny
Adds the macros ck_assert_double_{eq,ne,lt,gt,le,ge} to compare double values using a fixed tolerance value. The tolerance value is picked based on the range of values to be expected by the libinput API. Signed-off-by: Andreas Pokorny --- test/litest-selftest.c | 66 +

[PATCH libinput v2 5/5] libinput: add orientation and size of touch point and pressure to the API

2015-06-19 Thread Andreas Pokorny
This change adds four new properties to touch events. major: diameter of the touch ellipse along the major axis minor: diameter perpendicular to major axis pressure: a pressure value mapped into the range [0,1] orientation: the angle between major and the x axis Those values are optionally support

[PATCH libinput] test: move tapping tests into a separate binary

2015-06-19 Thread Peter Hutterer
The previous set hit _some_ sort of limit, but no idea what or why. When adding one more test, the touchpad test case would reliably fail with a udev timeout in litest_wait_for_udev(). This only happened in the valgrind case, the normal run succeeded. Reproduced on three different installations (2