[PATCH wayland 3/5] server: don't proceed in posting no-memory error on client destruction

2016-05-13 Thread Marek Chalupa
When a client is being destroyed, the display_resource is set to NULL. If then some destroy handler calls wl_client_post_no_memory() or wl_resource_post_no_memory() we crash. Signed-off-by: Marek Chalupa --- src/wayland-server.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src

[PATCH wayland 5/5] tests: test whether the destroyed object is set to NULL on client destruction

2016-05-13 Thread Marek Chalupa
when the client is being destroyed, we can use wl_client_get_object() to get an object. Test whether it returns NULL when the object has been destroyed Signed-off-by: Marek Chalupa --- tests/client-test.c | 63 + 1 file changed, 63 insertions(+

[PATCH wayland 2/5] server: set map entry to NULL after resource is destroyed

2016-05-13 Thread Marek Chalupa
We did it only for client entries for some reason, so when we used wl_client_get_object() for some server object that has been destroyed, we got dangling pointer. NOTE: this is basically an API change, since it changes the return value of wl_client_get_object() in some corner cases. However, now w

[PATCH wayland 4/5] client-test: test posting no-mem error on client destruction

2016-05-13 Thread Marek Chalupa
while client is being destroyed, it destroys all its resources. Destroy handlers are called for the resources and if some destroy handler post no memory error, we get crash, because the display resource is NULL (it is destroyed as a first resource) Signed-off-by: Marek Chalupa --- tests/client-t

[PATCH wayland 1/5] display-test: move a misplaced comment

2016-05-13 Thread Marek Chalupa
we split a function while refactoring in c643781 and now the comment makes no sense Signed-off-by: Marek Chalupa --- tests/display-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/display-test.c b/tests/display-test.c index f9f8160..17956db 100644 --- a/tests/

Re: [PATCH weston] eventdemo: use %u for uint32_t printing

2016-05-13 Thread Benoit Gschwind
Hello Pekka, Look sane. Reviewed-by: Benoit Gschwind On 13/05/2016 13:38, Pekka Paalanen wrote: > From: Pekka Paalanen > > I was confused why timestamp was printed negative. This fixes it, and > others while at it. > > Signed-off-by: Pekka Paalanen > --- > clients/eventdemo.c | 12 ++--

[PATCH weston] eventdemo: use %u for uint32_t printing

2016-05-13 Thread Pekka Paalanen
From: Pekka Paalanen I was confused why timestamp was printed negative. This fixes it, and others while at it. Signed-off-by: Pekka Paalanen --- clients/eventdemo.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/eventdemo.c b/clients/eventdemo.c index

Re: [PATCH weston 1/3] eventdemo: do not print pointer frames alone

2016-05-13 Thread Pekka Paalanen
On Fri, 13 May 2016 11:03:07 +0200 Benoit Gschwind wrote: > Hello Pekka, > > as-is you get my: > Reviewed-by: Benoit Gschwind > Tested-by: Benoit Gschwind > > But I have comments that may be worth to read :) > > On 10/05/2016 16:11, Pekka Paalanen wrote: > > From: Pekka Paalanen > > > > Pr

[PATCH weston v1 0/3] compositor-x11: improving handling of mouse events

2016-05-13 Thread Benoit Gschwind
v1: - add some sanity checking, - remove redundant viarable, - use a better X11 passive grab Benoit Gschwind (3): compositor-x11: add assert to avoid misuse of x11_backend_deliver_button_event compositor-x11: remove redundant state arg of x11_backend_deliver_button_event composito

[PATCH weston v1 3/3] compositor-x11: remove manual mouse button grab/ungrab

2016-05-13 Thread Benoit Gschwind
In current compositor-x11, the mouse buttons are grabbed and ungrabbed manually that may produce weird cases like starting a grab while the buttons are already released, due to asynchronous X11 events dispatching. The patch avoid the issue by using the better passive button grab, that automaticall

[PATCH weston v1 2/3] compositor-x11: remove redundant state arg of x11_backend_deliver_button_event

2016-05-13 Thread Benoit Gschwind
The "state" variable in x11_backend_deliver_button_event is basically the same as (event->response_type == XCB_BUTTON_PRESS), thus update the code to use the last one. Signed-off-by: Benoit Gschwind --- src/compositor-x11.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletio

[PATCH weston v1 1/3] compositor-x11: add assert to avoid misuse of x11_backend_deliver_button_event

2016-05-13 Thread Benoit Gschwind
The x11_backend_deliver_button_event can be called with any xcb_generic_event. The assert check if the call is done with the expected events. Signed-off-by: Benoit Gschwind --- src/compositor-x11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor-x11.c b/src/compositor-x11.c

Re: [PATCH weston 2/3] eventdemo: use zalloc

2016-05-13 Thread Benoit Gschwind
Hello Pekka, Reviewed-by: Benoit Gschwind Tested-by: Benoit Gschwind just in case, If you apply my suggestion for the previous patch, this patch may be useless. Best regards, Benoit Gschwind On 10/05/2016 16:11, Pekka Paalanen wrote: > From: Pekka Paalanen > > Zero-initialize the struct, ju

Re: [PATCH weston 3/3] eventdemo: do not print axis events if not requested

2016-05-13 Thread Benoit Gschwind
Hello Pekka, Reviewed-by: Benoit Gschwind Tested-by: Benoit Gschwind That surprising that the log_axis was not used here :) Best regards, Benoit Gschwind On 10/05/2016 16:11, Pekka Paalanen wrote: > From: Pekka Paalanen > > Signed-off-by: Pekka Paalanen > --- > clients/eventdemo.c | 9 +++

Re: [PATCH weston 1/3] eventdemo: do not print pointer frames alone

2016-05-13 Thread Benoit Gschwind
Hello Pekka, as-is you get my: Reviewed-by: Benoit Gschwind Tested-by: Benoit Gschwind But I have comments that may be worth to read :) On 10/05/2016 16:11, Pekka Paalanen wrote: > From: Pekka Paalanen > > Print pointer frames only if any pointer related events are printed > first. > > This

Re: [PATCH] Build a libweston library

2016-05-13 Thread Quentin Glidic
On 11/05/2016 21:31, Giulio Camuffo wrote: This patch creates a libweston-N.so library, where N is the "libweston_abi_version" defined in configure.ac. Almost all the code that was previously built in the weston binary is now in libweston.sp, except main.c and log.c. Possibly other files will ne

Re: [PATCH libinput] gestures: don't send swipe gestures when gestures are disabled

2016-05-13 Thread Hans de Goede
Hi, On 13-05-16 02:29, Peter Hutterer wrote: Introduced in 6ad303b as part of an code flow optimization, causing any 3+ finger gesture to be posted as swipe gesture, even when gestures are disabled. However, the event is filtered in the higher levels with a bug message printed to the log. Don't