[PATCH weston] screen-share: don't test keyboard/pointer pointers

2015-07-31 Thread Dawid Gajownik
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 m

Re: [PATCH wayland] wayland-client : Fix queue_release not to call proxy_destroy

2015-07-31 Thread Jonas Ådahl
On Fri, Jul 31, 2015 at 02:22:03PM -0700, Bill Spitzak wrote: > On Fri, Jul 31, 2015 at 2:02 AM, Elvis Lee wrote: > > > > > + proxy_destroyed = !!(proxy->flags & > > WL_PROXY_FLAG_DESTROYED); > > + > > + proxy->refcount--; > > + if (proxy_destroyed && !pr

[PATCH weston] compositor-rdp: rdp_destroy() double free error #91457

2015-07-31 Thread Dawid Gajownik
When something goes wrong during weston initialization, weston_compositor_destroy() is executed. It destroys the backend and then frees compositor memory. Unfortunately RDP backend is not correctly destroyed. It frees compositor instead of a backend memory. This causes later a double free error. T

Re: [PATCH weston] .gitignore: ignore doxygen generated files v2

2015-07-31 Thread Bryce Harrington
On Fri, Jul 31, 2015 at 06:28:59PM -0300, Dawid Gajownik wrote: > Fixes incorrect commit d95637905861162c08251843a11e509b5d94 > > Signed-off-by: Dawid Gajownik Thanks for the follow up fix. Reviewed-by: Bryce Harrington Pushed: To ssh://git.freedesktop.org/git/wayland/weston 1281a36..2

Re: [PATCH weston v2 3/5] compositor: Emit wl_pointer_gesture_* events on libinput gesture events

2015-07-31 Thread Bill Spitzak
On Thu, Jul 30, 2015 at 4:03 PM, Peter Hutterer wrote: > On Thu, Jul 30, 2015 at 12:43:29PM -0700, Bill Spitzak wrote: > > Okay then, but that brings me back to my original question: > > > > If a client does not ask for a particular gesture (by not creating the > > protocol object that delivers t

Re: [PATCH v7 weston 17/17] input: Don't test keyboard/pointer/touch pointers

2015-07-31 Thread Bryce Harrington
On Thu, Jul 30, 2015 at 09:40:56AM +0800, Jonas Ådahl wrote: > On Wed, Jul 15, 2015 at 01:00:48PM -0500, Derek Foreman wrote: > > 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 th

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

2015-07-31 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] .gitignore: ignore doxygen generated files v2

2015-07-31 Thread Dawid Gajownik
Fixes incorrect commit d95637905861162c08251843a11e509b5d94 Signed-off-by: Dawid Gajownik --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dff56db..10a15d7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,9 +32,9 @@ cscope.out /

Re: [PATCH libinput 3/6] touchpad: make gestures optional

2015-07-31 Thread Bill Spitzak
On Fri, Jul 31, 2015 at 1:43 AM, Hans de Goede wrote: > > I thought about that when doing the patch but decided for this approach on >> purpose. currently, a mis-detection of a pinch gesture with gestures >> enabled means the gesture remains until the fingers are lifted. with this >> patch otoh

Re: [PATCH wayland] wayland-client : Fix queue_release not to call proxy_destroy

2015-07-31 Thread Bill Spitzak
On Fri, Jul 31, 2015 at 2:02 AM, Elvis Lee wrote: > > + proxy_destroyed = !!(proxy->flags & > WL_PROXY_FLAG_DESTROYED); > + > + proxy->refcount--; > + if (proxy_destroyed && !proxy->refcount) > + free(proxy); > It seems like you don

Re: [PATCH weston v3 1/5] protocol: Add _wl_pointer_gestures (swipe/pinch) protocol

2015-07-31 Thread Bill Spitzak
On Fri, Jul 31, 2015 at 6:59 AM, Carlos Garnacho wrote: > > + > + > + This event is sent when a multi-finger pinch gesture changes the > + position of the logical center, the rotation or the relative scale. > + > + The dx and dy coordinates are relative coordinates in

Re: [PATCH weston v2 1/5] protocol: Add _wl_pointer_gestures (swipe/pinch) protocol

2015-07-31 Thread Bill Spitzak
On Fri, Jul 31, 2015 at 6:53 AM, Carlos Garnacho wrote: > >> + > > > > Since this is an "int" maybe it should say "1 if the gesture was > > cancelled, otherwise 0". Or maybe be an enum? > > I've been kept thinking about the enum possibility, but I could just > come up with awkward names >

Re: [PATCH weston] Update .gitignore

2015-07-31 Thread Dawid Gajownik
I'm sorry, it was my first patch sent to this project and of course I had to make a mistake... It should be /doc/doxygen/*.doxygen not /docs/doxygen/*.doxygen On Fri, Jul 31, 2015 at 5:58 PM, Bill Spitzak wrote: > > > On Fri, Jul 31, 2015 at 12:53 PM, Bryce Harrington > wrote: >> >> On Wed, J

Re: [PATCH weston] Update .gitignore

2015-07-31 Thread Bill Spitzak
On Fri, Jul 31, 2015 at 12:53 PM, Bryce Harrington wrote: > On Wed, Jul 29, 2015 at 12:55:55AM -0300, Dawid Gajownik wrote: > > Hi, > > > > after running configure with "Enable developer documentation" set to > > "yes" git status warns about two new untracked files: > > > > doc/doxygen/to

[PATCH weston] main: print backends in help message in alphabetical order

2015-07-31 Thread Dawid Gajownik
For better readability of `weston --help' output, backends are now sorted in alphabetical order. Signed-off-by: Dawid Gajownik --- src/main.c | 90 +++--- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/main.c b/src/main

Re: [PATCH weston] Update .gitignore

2015-07-31 Thread Bryce Harrington
On Wed, Jul 29, 2015 at 12:55:55AM -0300, Dawid Gajownik wrote: > Hi, > > after running configure with "Enable developer documentation" set to > "yes" git status warns about two new untracked files: > > doc/doxygen/tooldev.doxygen > doc/doxygen/tools.doxygen > > Below is a small

Re: [PATCH weston] main: update RDP backend help message

2015-07-31 Thread Bryce Harrington
On Fri, Jul 31, 2015 at 02:57:54PM -0300, Dawid Gajownik wrote: > BTW is there a reason why backend modules are not listed in the > alphabetical order in `weston --help' output? I know it's just > cosmetic but maybe it would be a bit easier to find necessary > information if thing were sorted. I a

Re: [PATCH weston] main: update RDP backend help message

2015-07-31 Thread Bryce Harrington
On Fri, Jul 31, 2015 at 02:49:57PM -0300, Dawid Gajownik wrote: > `--env-socket' option is of type WESTON_OPTION_BOOLEAN, not > WESTON_OPTION_STRING. Socket should be defined in RDP_FD environment variable. > > Signed-off-by: Dawid Gajownik Confirmed: src/compositor-rdp.c: { WESTON_OP

Re: [PATCH weston] main: update RDP backend help message

2015-07-31 Thread Dawid Gajownik
BTW is there a reason why backend modules are not listed in the alphabetical order in `weston --help' output? I know it's just cosmetic but maybe it would be a bit easier to find necessary information if thing were sorted. Thanks, Dawid ___ wayland-

[PATCH weston] main: update RDP backend help message

2015-07-31 Thread Dawid Gajownik
`--env-socket' option is of type WESTON_OPTION_BOOLEAN, not WESTON_OPTION_STRING. Socket should be defined in RDP_FD environment variable. Signed-off-by: Dawid Gajownik --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index a2ed2b4..0017a

[PATCH weston v3 4/5] clients: Add pointer gesture support to weston-eventdemo

2015-07-31 Thread Carlos Garnacho
Just print the output, as with the other events. Signed-off-by: Carlos Garnacho Reviewed-by: Jonas Ådahl --- clients/eventdemo.c | 108 +++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/clients/eventdemo.c b/clients/eventdemo.c i

[PATCH weston v3 2/5] compositor: Implement wl_pointer_gesture_swipe/pinch interfaces

2015-07-31 Thread Carlos Garnacho
These are obtained from the _wl_pointer_gestures global resource, although each pointer will maintain the resources list and additional information for the pinch/swipe gestures. The lifetime and focus management of gesture resources is thus attached to the pointer. The translation of libinput even

[PATCH weston v3 3/5] clients: Request the wl_pointer_gesture_swipe/pinch interfaces

2015-07-31 Thread Carlos Garnacho
This is accompanied by separate handlers for the different stages of swipe/pinch gestures, so those can be set in demos. v3: added null checks around pointer gesture interface destruction, nullify afterwards. v2: depend on standalone protocol xml. Signed-off-by: Carlos Garnacho Reviewed-by:

[PATCH weston v3 5/5] clients: Add pointer pinch gesture support to weston-image

2015-07-31 Thread Carlos Garnacho
It will allow zooming in/out the loaded image. Signed-off-by: Carlos Garnacho --- clients/image.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/clients/image.c b/clients/image.c index d28f221..b4339b8 100644 --- a/clients/image.c +++ b/clients/image.c @

[PATCH weston v3 1/5] protocol: Add _wl_pointer_gestures (swipe/pinch) protocol

2015-07-31 Thread Carlos Garnacho
The whole feature is exposed by the wl_pointer_gestures global resource, which can be used to obtain individual swipe/pinch gesture interfaces for a given wl_pointer. The lifetime and progress of gestures is maintained by the separate wl_pointer_gesture_pinch and wl_pointer_gesture_swipe interface

Re: [PATCH weston v2 1/5] protocol: Add _wl_pointer_gestures (swipe/pinch) protocol

2015-07-31 Thread Carlos Garnacho
Hey Jonas :), On Wed, Jul 29, 2015 at 4:52 AM, Jonas Ådahl wrote: > On Thu, Jul 23, 2015 at 07:00:27PM +0200, Carlos Garnacho wrote: >> The whole feature is exposed by the wl_pointer_gestures global >> resource, which can be used to obtain individual swipe/pinch >> gesture interfaces for a given

[PATCH weston] Update .gitignore

2015-07-31 Thread Dawid Gajownik
Hi, after running configure with "Enable developer documentation" set to "yes" git status warns about two new untracked files: doc/doxygen/tooldev.doxygen doc/doxygen/tools.doxygen Below is a small patch. HTH, Dawid diff --git a/.gitignore b/.gitignore index b13bf55..49e19d9

Re: [PATCH wayland] wayland-client : Fix queue_release not to call proxy_destroy

2015-07-31 Thread Jonas Ådahl
On Fri, Jul 31, 2015 at 06:02:54PM +0900, Elvis Lee wrote: > proxy_destroy could be called twice by wl_proxy_destroy and > wl_event_queue_release. > Then, wl_map_remove was called twice for same object id. > > Signed-off-by: Elvis Lee This looks better to me, thanks. Reviewed-by: Jonas Ådahl

[PATCH wayland] wayland-client : Fix queue_release not to call proxy_destroy

2015-07-31 Thread Elvis Lee
proxy_destroy could be called twice by wl_proxy_destroy and wl_event_queue_release. Then, wl_map_remove was called twice for same object id. Signed-off-by: Elvis Lee --- src/wayland-client.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/wayland-client.c b/

Re: [PATCH libinput 3/6] touchpad: make gestures optional

2015-07-31 Thread Hans de Goede
Hi, On 31-07-15 01:25, Peter Hutterer wrote: On Thu, Jul 30, 2015 at 02:29:18PM +0200, Hans de Goede wrote: Hi, On 30-07-15 08:11, Peter Hutterer wrote: Not all multi-finger touchpads are able to reliably produce gestures, so make it optional. This patch just adds a boolean (currently always

Re: [PATCH libinput 4/6] touchpad: disable gestures on Synaptics semi-mt touchpads

2015-07-31 Thread Hans de Goede
Hi, On 31-07-15 01:51, Peter Hutterer wrote: On Thu, Jul 30, 2015 at 04:34:14PM +0200, Hans de Goede wrote: Hi, On 30-07-15 14:31, Hans de Goede wrote: Hi, On 30-07-15 08:11, Peter Hutterer wrote: Follow-up to eb146677e, if we disable 2fg scrolling on those touchpads we should also disable

Re: [PATCH libinput 6/6] touchpad: pretend the jumpy semi-mt touchpad is a single-touch touchpad

2015-07-31 Thread Hans de Goede
Hi, On 31-07-15 01:36, Peter Hutterer wrote: On Thu, Jul 30, 2015 at 04:45:04PM +0200, Hans de Goede wrote: Hi, On 30-07-15 14:33, Hans de Goede wrote: Hi, On 30-07-15 08:11, Peter Hutterer wrote: The first finger is accurate, it's just the second finger that is imprecise, so we can't handl

Re: How can an X11 tell it's running in XWayland?

2015-07-31 Thread Olivier Fourdan
Hi Thiago, On 31 July 2015 at 10:28, Thiago Macieira wrote: > It might have been unset to cause a parent application to start inside X > instead of using Wayland. > ​Yes, I thought of that as well, however in this case I'm working on, it's for a screen saver so I reckon the environment remain

Re: How can an X11 tell it's running in XWayland?

2015-07-31 Thread Thiago Macieira
On Friday 31 July 2015 09:59:01 Olivier Fourdan wrote: > Hi Jonas, > > On 31 July 2015 at 09:52, Jonas Ådahl wrote: > > Might be missing something obvious but shouldn't it be possible to check > > whether > > ​​ > > WAYLAND_DISPLAY environment variable is set? > > Y > ​eap, even simpler! It mig

Re: How can an X11 tell it's running in XWayland?

2015-07-31 Thread Olivier Fourdan
Hi Jonas, On 31 July 2015 at 09:52, Jonas Ådahl wrote: > Might be missing something obvious but shouldn't it be possible to check > whether > ​​ > WAYLAND_DISPLAY environment variable is set? > Y ​eap, even simpler! Cheers, Olivier​ ___ wayland-devel

Re: How can an X11 tell it's running in XWayland?

2015-07-31 Thread Jonas Ådahl
On Fri, Jul 31, 2015 at 09:48:53AM +0200, Olivier Fourdan wrote: > Hi > > Some apps should be run in a plain X11 session but not in XWayland (e.g. an > X11 screensaver makes no sense in Wayland/XWayland). > > There is one atom WL_SURFACE_ID that should be created only on/by XWayland > (for obviou

Re: [PATCH wayland] wayland-client : Fix duplicated proxy destroy

2015-07-31 Thread Jonas Ådahl
On Fri, Jul 31, 2015 at 04:04:14PM +0900, Elvis Lee wrote: > proxy_destroy can be called twice by wl_proxy_destroy and > wl_event_queue_release. > In that case, wl_map_remove should be called only once for same object id. > > Signed-off-by: Elvis Lee Yepp. In 5c70c031 we started to destroy prox

How can an X11 tell it's running in XWayland?

2015-07-31 Thread Olivier Fourdan
Hi Some apps should be run in a plain X11 session but not in XWayland (e.g. an X11 screensaver makes no sense in Wayland/XWayland). There is one atom WL_SURFACE_ID that should be created only on/by XWayland (for obvious reasons), is that reliable enough to determine we're running on XWayland? Th

[PATCH wayland] wayland-client : Fix duplicated proxy destroy

2015-07-31 Thread Elvis Lee
proxy_destroy can be called twice by wl_proxy_destroy and wl_event_queue_release. In that case, wl_map_remove should be called only once for same object id. Signed-off-by: Elvis Lee --- src/wayland-client.c |4 1 file changed, 4 insertions(+) diff --git a/src/wayland-client.c b/src/wa