[RFC libinput] tools: add a tool for GUI-based debugging

2014-05-26 Thread Peter Hutterer
Looking at debugging output is nice but not useful when testing for the feel of a device. Add a tool that presents a canvas and draws the various events onto it. --- Still a bit rough and doesn't handle button/key events yet but it makes testing changes a lot easier (especially for pointer motion a

Re: [PATCH 2/5] Remove wayland_protocoldir definition

2014-05-26 Thread Pekka Paalanen
On Mon, 19 May 2014 17:12:40 +0200 Thierry Reding wrote: > From: Thierry Reding > > This is mostly useless and can be confusing in makefiles. The pattern > rules defined in the makefile snippet are generic enough to allow the > protocol sources to reside in subdirectories. > > Signed-off-by: T

Re: [PATCH libinput 5/6] touchpad: Don't allow diagonal scrolling

2014-05-26 Thread Peter Hutterer
On Mon, May 26, 2014 at 09:06:50PM +1000, Peter Hutterer wrote: > On 26/05/2014 16:32 , Hans de Goede wrote: > >Hi, > > > >On 05/25/2014 10:34 AM, Jonas Ådahl wrote: > >>On Fri, May 23, 2014 at 04:06:26PM +0200, Hans de Goede wrote: > >>>We pin scrolling to the initial direction, so a 2 finger scro

Re: [PATCH 1/5] Always build wayland-scanner

2014-05-26 Thread Pekka Paalanen
On Mon, 19 May 2014 17:12:39 +0200 Thierry Reding wrote: > From: Thierry Reding > > When cross-compiling, wayland-scanner cannot be used to generate files > because it is built for the host architecture. To overcome this, users > currently need to instruct the build not to create wayland-scanne

[PATCH libinput 4/7 v2] Add basic mouse pointer acceleration

2014-05-26 Thread Jonas Ådahl
This patch reimplements the simple smooth pointer acceleration profile from X.org xserver. The algorithm is identical to the classic profile with a non-zero pointer acceleration threshold. When support for changable parameters is in place, to get a pointer acceleration the same as the default clas

[PATCH libinput 3/7] test: Queue two motion events in pointer event conversion test

2014-05-26 Thread Jonas Ådahl
Pointer acceleration filters may absorb the first event, so queue two, just in case. Signed-off-by: Jonas Ådahl --- test/misc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/test/misc.c b/test/misc.c index 5bf9477..f2088ca 100644 --- a/test/misc.c +++ b/test/misc.c @@ -158,6 +158,11 @

[PATCH libinput 5/7] touchpad: Make anisotropic motion deltas isotropic

2014-05-26 Thread Jonas Ådahl
The x and y absolute axis may have different resolutions, meaning 1 unit long motion delta on one axis is not physically as long as 1 unit motion delta on the other axis. In order to make these anisotropic input motion deltas output as isotropic motion deltas, apply scaling to one of the axis maki

[PATCH libinput 7/7] filter: Ignore non-suitable trackers when calculating initial velocity

2014-05-26 Thread Jonas Ådahl
calculate_velocity() didn't skip pointer trackers far away in time when calculating the initial velocity. This check was done later when iterating the rest, so while at it, simplify the function by doing both iterations in one single loop. Signed-off-by: Jonas Ådahl --- src/filter.c | 31 +++

[PATCH libinput 1/7] filter: Add motion filter destruction helper

2014-05-26 Thread Jonas Ådahl
Signed-off-by: Jonas Ådahl --- src/evdev-mt-touchpad.c | 3 +-- src/filter.c| 9 + src/filter.h| 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 89cebd5..751132c 100644 --- a/src/evdev-m

[PATCH libinput 6/7] filter: Fix get_direction for short vectors

2014-05-26 Thread Jonas Ådahl
Short vectors alongside the x axis produced inverted directions. Signed-off-by: Jonas Ådahl --- src/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filter.c b/src/filter.c index 45f060f..df4d60a 100644 --- a/src/filter.c +++ b/src/filter.c @@ -105,9 +105,9 @@

[PATCH libinput 2/7] test: Make relative pointer event test more accepting

2014-05-26 Thread Jonas Ådahl
A test cannot exactly predict the resulting motion event from a given evdev event series without having to reimplement the acceleration algorithm. To still be able to test that sane relative motion events are produced, check that the length and direction of the resulting motion event vectors are cl

Re: [PATCH wayland-web 1/7] Put a box around all code samples

2014-05-26 Thread Pekka Paalanen
On Mon, 26 May 2014 10:11:41 -0700 Bill Spitzak wrote: > On 05/26/2014 01:40 AM, Pekka Paalanen wrote: > > > I put what I did so far to: > > http://cgit.collabora.com/git/user/pq/wayland-web.git/log/?h=for-bill > > > > Could you take that branch and work it into a complete new > > series with yo

Re: [PATCH wayland-web 1/7] Put a box around all code samples

2014-05-26 Thread Bill Spitzak
On 05/26/2014 01:40 AM, Pekka Paalanen wrote: I put what I did so far to: http://cgit.collabora.com/git/user/pq/wayland-web.git/log/?h=for-bill Could you take that branch and work it into a complete new series with your other changes? Thanks, I will base the next version on that. I think I on

[PATCH 2/2] Use FreeRDP buildin functions to get scancodes

2014-05-26 Thread Hardening
This patch make use of the functions available in FreeRDP to retrieve the scancode to inject. --- src/compositor-rdp.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c index 437954f..b749129 100644 --- a/src/c

[PATCH 0/2] RDP Keyboard

2014-05-26 Thread Hardening
I'm resending this serie of patches that are related to keyboard with the RDP compositor. The first one make weston support more RDP keyboard (RDP to Xkb convertion). The second make use of buildin FreeRDP functions instead of reinventing the wheel. I didn't had many feedback for these at the las

[PATCH 1/2] Add more keyboards for the RDP compositor

2014-05-26 Thread Hardening
This patch complements the table that contains matches between RDP and xkb keyboard layouts. We now handle variants too. --- src/compositor-rdp.c | 132 ++- 1 file changed, 120 insertions(+), 12 deletions(-) diff --git a/src/compositor-rdp.c b/src/c

[PATCH 3/3] tests: test posting errors

2014-05-26 Thread Marek Chalupa
Test posting errors to one and more clients. --- tests/display-test.c | 246 +++ 1 file changed, 246 insertions(+) diff --git a/tests/display-test.c b/tests/display-test.c index 844a649..e212942 100644 --- a/tests/display-test.c +++ b/tests/display-

[PATCH 2/3] tests: use test compositor in queue-test

2014-05-26 Thread Marek Chalupa
Most of the code of queue-test is covered by the test compositor, so we can save few lines and use the test compositor instead. I think it's also more readable. --- tests/queue-test.c | 158 +++-- 1 file changed, 20 insertions(+), 138 deletions(-) d

[PATCH 1/3] tests: add test-compositor

2014-05-26 Thread Marek Chalupa
This patch introduces a set of functions that can create a display and clients for tests. On server side the user can use functions: display_create() display_destroy() create_client() display_run() display_resume() and on client side the user can use: client_connect() client_disconnec

[PATCH 2/3] tests: remove assert from frame_callback_wait()

2014-05-26 Thread Marek Chalupa
This function did dispatching wrapped in assert so when an error came, the test was aborted. Now, with expect_protocol_error, we need this function to abort only when we are not calling expect_protocol_error afterwards. So instead of calling the assert inside of this function, wrap this function in

[PATCH 3/3] tests: use expect_protocol_error in tests

2014-05-26 Thread Marek Chalupa
Turn FAIL_TESTs to TESTs. FAIL_TESTs are bad... --- tests/bad-buffer-test.c | 33 - tests/subsurface-test.c | 40 2 files changed, 28 insertions(+), 45 deletions(-) diff --git a/tests/bad-buffer-test.c b/tests/bad-buffer-tes

[PATCH 1/3] tests: add expect_protocol_error function

2014-05-26 Thread Marek Chalupa
This function checks if a particular protocol error came in wire. It's usefull in the cases where we hitherto used FAIL_TEST. The problem with FAIL_TEST is that *any* assert will pass the test, but we want only some asserts to pass the test (i. e. we don't want the test to pass when it, for example

[PATCH] client: extend error handling

2014-05-26 Thread Marek Chalupa
When an error occurs, wl_display_get_error() does not provide any way of getting know if it was a local error or if it was an error event, respectively what object caused the error and what the error was. This patch introduces a new function wl_display_get_protocol_error() which will return error

Re: Rethinking the FAIL_TESTs

2014-05-26 Thread Marek Chalupa
Maan, git send-email broken. It'll take a little bit of time, but the patches will come eventually Marek On 26 May 2014 15:47, Marek Chalupa wrote: > Hi, > > When we expect a failure in test, we're using FAIL_TEST at the moment. > The FAIL_TEST will pass on any failure in the test -- but we w

Rethinking the FAIL_TESTs

2014-05-26 Thread Marek Chalupa
Hi, When we expect a failure in test, we're using FAIL_TEST at the moment. The FAIL_TEST will pass on any failure in the test -- but we want the test pass only when it fails on a particular line. Consider this code: 1 FAIL_TEST 2 { 3struct wl_display *d = wl_display_connect(); 4

Re: [PATCH libinput 5/6] touchpad: Don't allow diagonal scrolling

2014-05-26 Thread Peter Hutterer
On 26/05/2014 16:32 , Hans de Goede wrote: Hi, On 05/25/2014 10:34 AM, Jonas Ådahl wrote: On Fri, May 23, 2014 at 04:06:26PM +0200, Hans de Goede wrote: We pin scrolling to the initial direction, so a 2 finger scroll starting in the vertical direction, will from then on only generate vertical

Re: [PATCH libinput 2/6] touchpad: Fix sending of scroll stop events

2014-05-26 Thread Peter Hutterer
On 26/05/2014 16:33 , Hans de Goede wrote: Hi, On 05/25/2014 02:13 PM, Jonas Ådahl wrote: On Fri, May 23, 2014 at 04:06:23PM +0200, Hans de Goede wrote: Setting tp->scroll.direction = 0 before checking tp->scroll.direction to see if we need to send stop scroll events for vert / horz scrolling

Re: [PATCH wayland-web 1/7] Put a box around all code samples

2014-05-26 Thread Pekka Paalanen
On Fri, 23 May 2014 18:57:38 -0700 Bill Spitzak wrote: > Not sure what happened here. I tested this and it came out with a header > email, with all the patches as replies to it. But when I did it for real > the header disappared. Header message: > > This is v4 of this patch. It has been split