Re: [PATCH weston v3 6/8] ivi-shell: Support tracking active surfaces

2016-06-03 Thread Bryce Harrington
On Thu, May 26, 2016 at 06:02:00PM +0300, Pekka Paalanen wrote:
> On Thu,  7 Apr 2016 16:44:21 -0700
> Bryce Harrington  wrote:
> 
> > Activity for ivi-shell follows either click or touch.  Only a single
> > surface can be active in the shell at a time.
> > 
> > Signed-off-by: Bryce Harrington 
> > ---
> >  Makefile.am   |  4 ++-
> >  configure.ac  |  2 ++
> >  ivi-shell/ivi-shell.c | 10 ++
> >  ivi-shell/ivi-shell.h |  2 ++
> >  src/compositor.c  | 91 
> > ++-
> >  5 files changed, 107 insertions(+), 2 deletions(-)
> 
> Hi,
> 
> this looks like commit squashing accident, I would not expect to find
> the generic server implementation to be found in this patch. Please
> split.
> 
> > diff --git a/Makefile.am b/Makefile.am
> > index cbb3b57..aa3aa1b 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -126,7 +126,9 @@ nodist_weston_SOURCES = 
> > \
> > protocol/scaler-protocol.c  \
> > protocol/scaler-server-protocol.h   \
> > protocol/linux-dmabuf-unstable-v1-protocol.c\
> > -   protocol/linux-dmabuf-unstable-v1-server-protocol.h
> > +   protocol/linux-dmabuf-unstable-v1-server-protocol.h \
> > +   protocol/idle-inhibit-unstable-v1-protocol.c\
> > +   protocol/idle-inhibit-unstable-v1-server-protocol.h
> >  
> >  BUILT_SOURCES += $(nodist_weston_SOURCES)
> >  
> > diff --git a/configure.ac b/configure.ac
> > index bba8050..d4817a9 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -4,6 +4,8 @@ m4_define([weston_micro_version], [90])
> >  m4_define([weston_version],
> >[weston_major_version.weston_minor_version.weston_micro_version])
> >  
> > +# Note: Inhibition patchset requires inhibition protocol in 
> > wayland-protocol
> > +
> >  AC_PREREQ([2.64])
> >  AC_INIT([weston],
> >  [weston_version],
> > diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
> > index 59f5656..9739014 100644
> > --- a/ivi-shell/ivi-shell.c
> > +++ b/ivi-shell/ivi-shell.c
> > @@ -434,11 +434,16 @@ static void
> >  click_to_activate_binding(struct weston_pointer *pointer, uint32_t time,
> >   uint32_t button, void *data)
> >  {
> > +   struct ivi_shell *shell = data;
> > +
> > if (pointer->grab != >default_grab)
> > return;
> > if (pointer->focus == NULL)
> > return;
> >  
> > +   if (shell->active_surface != NULL)
> > +   weston_surface_deactivate(shell->active_surface);
> > +
> > activate_binding(pointer->seat, pointer->focus);
> >  }
> >  
> > @@ -446,11 +451,16 @@ static void
> >  touch_to_activate_binding(struct weston_touch *touch, uint32_t time,
> >   void *data)
> >  {
> > +   struct ivi_shell *shell = data;
> > +
> > if (touch->grab != >default_grab)
> > return;
> > if (touch->focus == NULL)
> > return;
> >  
> > +   if (shell->active_surface != NULL)
> > +   weston_surface_deactivate(shell->active_surface);
> > +
> > activate_binding(touch->seat, touch->focus);
> >  }
> >  
> > diff --git a/ivi-shell/ivi-shell.h b/ivi-shell/ivi-shell.h
> > index 9a05eb2..87bce3a 100644
> > --- a/ivi-shell/ivi-shell.h
> > +++ b/ivi-shell/ivi-shell.h
> > @@ -55,6 +55,8 @@ struct ivi_shell
> > struct wl_resource *binding;
> > struct wl_list surfaces;
> > } input_panel;
> > +
> > +   struct weston_surface *active_surface;
> 
> I suspect this probably should be per-seat... it was the same as
> keyboard focus.
> 
> >  };
> >  
> >  struct weston_view *
> > diff --git a/src/compositor.c b/src/compositor.c
> > index 8e01d38..c89e443 100644
> > --- a/src/compositor.c
> > +++ b/src/compositor.c
> > @@ -51,6 +51,8 @@
> >  #include 
> >  #include 
> >  
> > +#include 
> 
> Use "" as this header is local, not from an installed location.
> 
> > +
> >  #include "timeline.h"
> >  
> >  #include "compositor.h"
> > @@ -2412,7 +2414,7 @@ weston_output_inhibited_outputs(struct 
> > weston_compositor *compositor)
> > continue;
> >  
> > /* Does the view's surface inhibit this output? */
> > -   if (!view->surface->inhibit_screensaving)
> > +   if (!view->surface->inhibit_idling)
> 
> Wait, there is a typo in an earlier patch?
> Please squash this hunk in the appropriate patch, otherwise I think
> there is a commit that won't build.
> 
> > continue;
> >  
> > inhibited_outputs_mask |= view->output_mask;
> > @@ -4631,6 +4633,89 @@ compositor_bind(struct wl_client *client,
> >compositor, NULL);
> >  }
> >  
> > +struct weston_idle_inhibitor {
> > +   struct weston_surface *surface;
> > +};
> > +
> > +static void
> > +destroy_idle_inhibitor(struct wl_resource *resource)
> > +{
> > +   struct weston_idle_inhibitor *inhibitor = 
> > 

Re: [PATCH weston v3 5/8] fullscreen-shell: Support tracking active surfaces

2016-06-03 Thread Bryce Harrington
On Thu, May 26, 2016 at 06:01:52PM +0300, Pekka Paalanen wrote:
> On Thu,  7 Apr 2016 16:44:20 -0700
> Bryce Harrington  wrote:
> 
> > Surface activity is determined by what surface is being displayed
> > fullscreen.  Only a single surface can be active in the shell.
> 
> Hi,
> 
> only a single surface can be active? But there is a surface for every
> output.
> 
> Shouldn't every visible surface be active in this case, as the shell
> protocol enforces a single visible surface per output policy?

Then in that case can all this just be shortcircuited and make all
surfaces be active?  If I understand what you're saying then by
definition with fullscreen-shell there would be no such thing as
non-active surfaces.

Bryce
 
> > Signed-off-by: Bryce Harrington 
> > ---
> >  fullscreen-shell/fullscreen-shell.c | 27 ++-
> >  1 file changed, 26 insertions(+), 1 deletion(-)
> > 
> > diff --git a/fullscreen-shell/fullscreen-shell.c 
> > b/fullscreen-shell/fullscreen-shell.c
> > index e1f8a63..8b1930f 100644
> > --- a/fullscreen-shell/fullscreen-shell.c
> > +++ b/fullscreen-shell/fullscreen-shell.c
> > @@ -46,6 +46,7 @@ struct fullscreen_shell {
> > struct wl_listener output_created_listener;
> >  
> > struct wl_listener seat_created_listener;
> > +   struct weston_surface *active_surface;
> >  };
> >  
> >  struct fs_output {
> > @@ -84,14 +85,23 @@ struct pointer_focus_listener {
> >  };
> >  
> >  static void
> > -pointer_focus_changed(struct wl_listener *listener, void *data)
> > +pointer_focus_changed(struct wl_listener *l, void *data)
> >  {
> > struct weston_pointer *pointer = data;
> > +   struct weston_surface *old_surface;
> > +   struct pointer_focus_listener *listener;
> > +
> > +   listener = container_of(l, struct pointer_focus_listener,
> > +   seat_destroyed);
> >  
> > if (pointer->focus && pointer->focus->surface->resource) {
> > +   old_surface = listener->shell->active_surface;
> > +   if (old_surface != NULL)
> > +   weston_surface_deactivate(old_surface);
> > weston_surface_assign_keyboard(pointer->focus->surface, 
> > pointer->seat);
> > if (pointer->focus->surface != NULL)
> > weston_surface_activate(pointer->focus->surface);
> > +   listener->shell->active_surface = pointer->focus->surface;
> 
> So the active surface is the one with the pointer focus?
> What happens when you have multiple weston_seats each with a pointer?
> 
> > }
> >  }
> >  
> > @@ -101,6 +111,7 @@ seat_caps_changed(struct wl_listener *l, void *data)
> > struct weston_seat *seat = data;
> > struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat);
> > struct weston_pointer *pointer = weston_seat_get_pointer(seat);
> > +   struct weston_surface *old_surface;
> > struct pointer_focus_listener *listener;
> > struct fs_output *fsout;
> >  
> > @@ -119,11 +130,15 @@ seat_caps_changed(struct wl_listener *l, void *data)
> > }
> >  
> > if (keyboard && keyboard->focus != NULL) {
> > +   old_surface = listener->shell->active_surface;
> > wl_list_for_each(fsout, >shell->output_list, link) {
> > if (fsout->surface) {
> > +   if (old_surface != NULL)
> > +   weston_surface_deactivate(old_surface);
> > weston_surface_assign_keyboard(fsout->surface, 
> > seat);
> > if (fsout->surface != NULL)
> > weston_surface_activate(fsout->surface);
> > +   listener->shell->active_surface = 
> > fsout->surface;
> > return;
> 
> Seat cap change taken into account, I wouldn't probably have thought of
> that. Very good.
> 
> > }
> > }
> > @@ -676,6 +691,7 @@ fullscreen_shell_present_surface(struct wl_client 
> > *client,
> > wl_resource_get_user_data(resource);
> > struct weston_output *output;
> > struct weston_surface *surface;
> > +   struct weston_surface *old_surface;
> > struct weston_seat *seat;
> > struct fs_output *fsout;
> >  
> > @@ -709,9 +725,13 @@ fullscreen_shell_present_surface(struct wl_client 
> > *client,
> > weston_seat_get_keyboard(seat);
> >  
> > if (keyboard && !keyboard->focus) {
> > +   old_surface = shell->active_surface;
> > +   if (old_surface != NULL)
> > +   weston_surface_deactivate(old_surface);
> > weston_surface_assign_keyboard(surface, seat);
> > if (surface != NULL)
> > weston_surface_activate(surface);
> > +   shell->active_surface = surface;
> 
> And 

Re: [PATCH weston 1/4] README: clarify libweston purpose/goals.

2016-06-03 Thread Yong Bakos
Hi Emil,

On Jun 3, 2016, at 8:27 AM, Emil Velikov  wrote:
> 
> From: Emil Velikov 
> 
> v2: Rewrap, add a couple of missing words (Pekka).
> 
> Signed-off-by: Emil Velikov 

I definitely agree that updating the README, especially regarding
versioning, is valuable. But, I'm not sure that the changes in this
specific patch communicates anything different than what already exists.

Regardless, some notes inline, below.


> ---
> README | 22 +++---
> 1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/README b/README
> index 110a14b..76be7b9 100644
> --- a/README
> +++ b/README
> @@ -73,17 +73,17 @@ http://ometer.com/parallel.html
> Libweston design goals
> --
> 
> -The high-level goal of libweston is that what used to be shell plugins
> -will be main executables. Instead of launching 'weston' with various
> -arguments to choose the shell, one would be launching
> -'weston-desktop', 'weston-ivi', 'orbital', etc. The main executable
> -(the hosting program) links to libweston for a fundamental compositor
> -implementation. Libweston is also intended for use by other projects
> -who want to create new "Wayland WMs".
> -
> -The libweston API/ABI will be separating the shell logic and main
> -program from the rest of the "Weston compositor" (libweston
> -internals).
> +The high-level goal of libweston is to decouple the compositor from
> +the the shell logic (what used to be shell plugins).

perhaps "shell implementation" instead of "shell logic."


> +
> +Thus the instead of having a single 'weston' launched with various

Thus, instead of launching 'weston' with...

> +arguments to choose the shell, one would be launching 'weston-desktop',

one would launch the shell itself, eg. 'weston-desktop', ...

> +'weston-ivi', 'orbital', etc. The main executable (the hosting program)
> +will implement the shell, while libweston will be used for a fundamental
> +compositor implementation.
> +
> +Libweston is also intended for use by other projects who want to create

by other projects that want
or
by other project developers who want


> +new "Wayland WMs".

Respectfully,
yong


> Details:
> 
> -- 
> 2.8.2

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] scanner: Fix reported executable name to 'wayland-scanner'

2016-06-03 Thread Yong Bakos
Hi,

On Jun 2, 2016, at 8:16 PM, Jonas Ådahl  wrote:
> 
> On Thu, Jun 02, 2016 at 02:42:44PM -0700, Bryce Harrington wrote:
>> 'wayland-scanner -v' (correctly) reports the program as named
>> "wayland-scanner", but 'wayland-scanner -h' was inconsistent, referring
>> to it as './scanner'.
>> 
>> Signed-off-by: Bryce Harrington 

Bryce, good catch! But...


> I guess we could also pass argv and use argv[0], but this works as well.
> 
> Reviewed-by: Jonas Ådahl 


I don't follow this at all, because...


>> ---
>> src/scanner.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/src/scanner.c b/src/scanner.c
>> index 5f06e8e..ae2326f 100644
>> --- a/src/scanner.c
>> +++ b/src/scanner.c
>> @@ -57,8 +57,8 @@ enum side {
>> static int
>> usage(int ret)
>> {
>> -fprintf(stderr, "usage: ./scanner [OPTION] 
>> [client-header|server-header|code]"
>> -" [input_file output_file]\n");
>> +fprintf(stderr, "usage: wayland-scanner [OPTION] 
>> [client-header|server-header|code]"
>> +" [input_file output_file]\n", argv[0]);

argv is out of scope here in `usage`. This won't compile without changing
the parameter list, and the passed args at all call sites.

Also, shouldn't the diff be more like (notice the %s format specifier):

+   fprintf(stderr, "usage: %s [OPTION] [client-header|server-header|code]"
+   " [input_file output_file]\n", argv[0]);


>>  fprintf(stderr, "\n");
>>  fprintf(stderr, "Converts XML protocol descriptions supplied on "
>>  "stdin or input file to client\n"
>> -- 
>> 1.9.1

Regards,
yong


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] scanner: Fix reported executable name to 'wayland-scanner'

2016-06-03 Thread Yong Bakos
On Jun 3, 2016, at 4:33 AM, Peter Hutterer  wrote:
> 
> On Fri, Jun 03, 2016 at 09:16:43AM +0800, Jonas Ådahl wrote:
>> On Thu, Jun 02, 2016 at 02:42:44PM -0700, Bryce Harrington wrote:
>>> 'wayland-scanner -v' (correctly) reports the program as named
>>> "wayland-scanner", but 'wayland-scanner -h' was inconsistent, referring
>>> to it as './scanner'.
>>> 
>>> Signed-off-by: Bryce Harrington 
>> 
>> I guess we could also pass argv and use argv[0], but this works as well.
> 
> can't we use program_invocation_short_name here? or is that to GNU-ish?
> 
> Cheers,
>   Peter

On that note, there are four occurrences of the string "wayland-scanner"
that could be extracted in a similar fashion. I humbly encourage that this
patch refactor all of them. Using program_invocation_short_name or a
single #define might suffice.

Best,
yong

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH wayland-protocols v3] Add screensaver idle inhibitor protocol

2016-06-03 Thread Yong Bakos
Hi,

On Jun 3, 2016, at 4:04 AM, Pekka Paalanen  wrote:
> 
> On Fri, 3 Jun 2016 09:26:24 +0800
> Jonas Ådahl  wrote:
> 
>> On Thu, Jun 02, 2016 at 02:24:20PM -0700, Bryce Harrington wrote:
>>> This interface allows disabling of screensaver/screenblanking on a
>>> per-surface basis.  As long as the surface remains visible and
>>> non-occluded it blocks the screensaver, etc. from activating on the
>>> output(s) that the surface is visible on.
>>> 
>>> To uninhibit, simply destroy the inhibitor object.
>>> 
>>> Signed-off-by: Bryce Harrington 
>>> ---
>>> 
>>> v2:
>>> + Rename protocol to idle-inhibit
>>> v3:
>>> + Added a destructor for the idle manager
>>> + Changed sub-surface behavior to inherit idle from parent surface
>>> + Various wording changes suggested by pq
>>> 
> 
> Hi,
> 
> you posted the last one marked as v3, so this would have been v4.
> 
>> Hi,
>> 
>> I think this looks sane, I only have a couple of questions that might
>> need clarification.
>> 
>>> 
>>> Makefile.am|  1 +
>>> unstable/idle-inhibit/README   |  4 ++
>>> unstable/idle-inhibit/idle-inhibit-unstable-v1.xml | 84 
>>> ++
>>> 3 files changed, 89 insertions(+)
>>> create mode 100644 unstable/idle-inhibit/README
>>> create mode 100644 unstable/idle-inhibit/idle-inhibit-unstable-v1.xml
>>> 
>>> diff --git a/Makefile.am b/Makefile.am
>>> index 71d2632..de691db 100644
>>> --- a/Makefile.am
>>> +++ b/Makefile.am
>>> @@ -8,6 +8,7 @@ unstable_protocols =
>>> \
>>> unstable/relative-pointer/relative-pointer-unstable-v1.xml  
>>> \
>>> unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
>>> \
>>> unstable/tablet/tablet-unstable-v1.xml  
>>> \
>>> +   unstable/idle-inhibit/idle-inhibit-unstable-v1.xml  
>>> \
>>> $(NULL)
>>> 
>>> stable_protocols =  
>>> \
>>> diff --git a/unstable/idle-inhibit/README b/unstable/idle-inhibit/README
>>> new file mode 100644
>>> index 000..396e871
>>> --- /dev/null
>>> +++ b/unstable/idle-inhibit/README
>>> @@ -0,0 +1,4 @@
>>> +Screensaver inhibition protocol
>>> +
>>> +Maintainers:
>>> +Bryce Harrington 
>>> diff --git a/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml 
>>> b/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml
>>> new file mode 100644
>>> index 000..af3a911
>>> --- /dev/null
>>> +++ b/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml
>>> @@ -0,0 +1,84 @@
>>> +
>>> +
>>> +
>>> +  
>>> +Copyright © 2015 Samsung Electronics Co., Ltd
>>> +
>>> +Permission is hereby granted, free of charge, to any person obtaining a
>>> +copy of this software and associated documentation files (the 
>>> "Software"),
>>> +to deal in the Software without restriction, including without 
>>> limitation
>>> +the rights to use, copy, modify, merge, publish, distribute, 
>>> sublicense,
>>> +and/or sell copies of the Software, and to permit persons to whom the
>>> +Software is furnished to do so, subject to the following conditions:
>>> +
>>> +The above copyright notice and this permission notice (including the 
>>> next
>>> +paragraph) shall be included in all copies or substantial portions of 
>>> the
>>> +Software.
>>> +
>>> +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
>>> EXPRESS OR
>>> +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
>>> MERCHANTABILITY,
>>> +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT 
>>> SHALL
>>> +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 
>>> OTHER
>>> +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>>> +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
>>> +DEALINGS IN THE SOFTWARE.
>>> +  
>>> +
>>> +  
>>> +
>>> +  This interface permits inhibiting the idle behavior such as screen
>>> +  blanking, locking, and screensaving.  The client binds the idle 
>>> manager
>>> +  globally, then creates idle-inhibitor objects for each surface.  
>> 
>> + for each surface that should inhibit the idle behavior. ?
> 
> Yeah, makes sense.
> 
>>> +
>>> +  Warning! The protocol described in this file is experimental and
>>> +  backward incompatible changes may be made. Backward compatible 
>>> changes
>>> +  may be added together with the corresponding interface version bump.
>>> +  Backward incompatible changes are done by bumping the version number 
>>> in
>>> +  the protocol and interface names and resetting the interface version.
>>> +  Once the protocol is to be declared stable, the 'z' prefix and the
>>> +  version number in the protocol and interface names are removed and 
>>> 

[PATCH weston 2/2] Rename src/ to libweston/

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

This clarifies what is supposed to be the libweston code.

Signed-off-by: Pekka Paalanen 
---
 Makefile.am | 184 ++--
 clients/cliptest.c  |   2 +-
 configure.ac|   4 +-
 {src => libweston}/animation.c  |   0
 {src => libweston}/bindings.c   |   0
 {src => libweston}/clipboard.c  |   0
 {src => libweston}/compositor-drm.c |   0
 {src => libweston}/compositor-drm.h |   0
 {src => libweston}/compositor-fbdev.c   |   0
 {src => libweston}/compositor-fbdev.h   |   0
 {src => libweston}/compositor-headless.c|   0
 {src => libweston}/compositor-headless.h|   0
 {src => libweston}/compositor-rdp.c |   0
 {src => libweston}/compositor-rdp.h |   0
 {src => libweston}/compositor-wayland.c |   0
 {src => libweston}/compositor-wayland.h |   0
 {src => libweston}/compositor-x11.c |   0
 {src => libweston}/compositor-x11.h |   0
 {src => libweston}/compositor.c |   0
 {src => libweston}/compositor.h |   0
 {src => libweston}/data-device.c|   0
 {src => libweston}/dbus.c   |   0
 {src => libweston}/dbus.h   |   0
 {src => libweston}/gl-renderer.c|   0
 {src => libweston}/gl-renderer.h|   0
 {src => libweston}/input.c  |   0
 {src => libweston}/launcher-direct.c|   0
 {src => libweston}/launcher-impl.h  |   0
 {src => libweston}/launcher-logind.c|   0
 {src => libweston}/launcher-util.c  |   0
 {src => libweston}/launcher-util.h  |   0
 {src => libweston}/launcher-weston-launch.c |   0
 {src => libweston}/libbacklight.c   |   0
 {src => libweston}/libbacklight.h   |   0
 {src => libweston}/libinput-device.c|   0
 {src => libweston}/libinput-device.h|   0
 {src => libweston}/libinput-seat.c  |   0
 {src => libweston}/libinput-seat.h  |   0
 {src => libweston}/libweston.pc.in  |   0
 {src => libweston}/linux-dmabuf.c   |   0
 {src => libweston}/linux-dmabuf.h   |   0
 {src => libweston}/log.c|   0
 {src => libweston}/noop-renderer.c  |   0
 {src => libweston}/pixman-renderer.c|   0
 {src => libweston}/pixman-renderer.h|   0
 {src => libweston}/screen-share.c   |   0
 {src => libweston}/screenshooter.c  |   0
 {src => libweston}/spring-tool.c|   0
 {src => libweston}/timeline-object.h|   0
 {src => libweston}/timeline.c   |   0
 {src => libweston}/timeline.h   |   0
 {src => libweston}/vaapi-recorder.c |   0
 {src => libweston}/vaapi-recorder.h |   0
 {src => libweston}/version.h.in |   0
 {src => libweston}/vertex-clipping.c|   0
 {src => libweston}/vertex-clipping.h|   0
 {src => libweston}/weston-egl-ext.h |   0
 {src => libweston}/weston-launch.c  |   0
 {src => libweston}/weston-launch.h  |   0
 {src => libweston}/zoom.c   |   0
 tests/ivi_layout-internal-test.c|   2 +-
 tests/ivi_layout-test-plugin.c  |   2 +-
 tests/surface-global-test.c |   2 +-
 tests/surface-test.c|   2 +-
 tests/vertex-clip-test.c|   2 +-
 tests/weston-test.c |   4 +-
 66 files changed, 102 insertions(+), 102 deletions(-)
 rename {src => libweston}/animation.c (100%)
 rename {src => libweston}/bindings.c (100%)
 rename {src => libweston}/clipboard.c (100%)
 rename {src => libweston}/compositor-drm.c (100%)
 rename {src => libweston}/compositor-drm.h (100%)
 rename {src => libweston}/compositor-fbdev.c (100%)
 rename {src => libweston}/compositor-fbdev.h (100%)
 rename {src => libweston}/compositor-headless.c (100%)
 rename {src => libweston}/compositor-headless.h (100%)
 rename {src => libweston}/compositor-rdp.c (100%)
 rename {src => libweston}/compositor-rdp.h (100%)
 rename {src => libweston}/compositor-wayland.c (100%)
 rename {src => libweston}/compositor-wayland.h (100%)
 rename {src => libweston}/compositor-x11.c (100%)
 rename {src => libweston}/compositor-x11.h (100%)
 rename {src => libweston}/compositor.c (100%)
 rename {src => libweston}/compositor.h (100%)
 rename {src => libweston}/data-device.c (100%)
 rename {src => libweston}/dbus.c (100%)
 rename {src => libweston}/dbus.h (100%)
 rename {src => libweston}/gl-renderer.c (100%)
 rename {src => libweston}/gl-renderer.h (100%)
 rename {src => libweston}/input.c (100%)
 rename {src => libweston}/launcher-direct.c (100%)
 rename {src => libweston}/launcher-impl.h (100%)
 rename {src => libweston}/launcher-logind.c (100%)
 rename {src => libweston}/launcher-util.c (100%)
 

[PATCH weston 1/2] Move weston source to compositor/

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

This is the start of separating weston-the-compositor source files from
libweston source files.

This is moving all the files related to the 'weston' binary. Also the
CMS and systemd plugins are moved.

xwayland plugin is not moved, because it will be turned into a
libweston feature.

To avoid breaking the build, #includes for weston.h are fixed to use
compositor/weston.h. This serves as a reminder that such files may need
further attention: moving to the right directory, or maybe using the
proper -I flags instead.

Signed-off-by: Pekka Paalanen 
---
 Makefile.am| 26 +-
 {src => compositor}/cms-colord.c   |  0
 {src => compositor}/cms-helper.c   |  0
 {src => compositor}/cms-helper.h   |  0
 {src => compositor}/cms-static.c   |  0
 {src => compositor}/main.c |  0
 {src => compositor}/systemd-notify.c   |  0
 {src => compositor}/text-backend.c |  0
 {src => compositor}/weston-screenshooter.c |  0
 {src => compositor}/weston.desktop |  0
 {src => compositor}/weston.h   |  0
 {src => compositor}/weston.pc.in   |  0
 configure.ac   |  2 +-
 desktop-shell/shell.c  |  2 +-
 ivi-shell/hmi-controller.c |  2 +-
 ivi-shell/ivi-layout.c |  2 +-
 ivi-shell/ivi-shell.c  |  2 +-
 tests/ivi_layout-test-plugin.c |  2 +-
 tests/weston-test.c|  2 +-
 xwayland/launcher.c|  2 +-
 xwayland/xwayland.h|  2 +-
 21 files changed, 22 insertions(+), 22 deletions(-)
 rename {src => compositor}/cms-colord.c (100%)
 rename {src => compositor}/cms-helper.c (100%)
 rename {src => compositor}/cms-helper.h (100%)
 rename {src => compositor}/cms-static.c (100%)
 rename {src => compositor}/main.c (100%)
 rename {src => compositor}/systemd-notify.c (100%)
 rename {src => compositor}/text-backend.c (100%)
 rename {src => compositor}/weston-screenshooter.c (100%)
 rename {src => compositor}/weston.desktop (100%)
 rename {src => compositor}/weston.h (100%)
 rename {src => compositor}/weston.pc.in (100%)

diff --git a/Makefile.am b/Makefile.am
index d1d2178..bdb929c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -113,7 +113,7 @@ systemd_notify_la_CFLAGS =  \
$(PIXMAN_CFLAGS)\
$(AM_CFLAGS)
 systemd_notify_la_SOURCES =\
-   src/systemd-notify.c\
+   compositor/systemd-notify.c \
shared/helpers.h\
shared/zalloc.h \
src/compositor.h
@@ -148,9 +148,9 @@ weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
-lm libshared.la libweston.la
 
 weston_SOURCES =   \
-   src/main.c  \
-   src/weston-screenshooter.c  \
-   src/text-backend.c
+   compositor/main.c   \
+   compositor/weston-screenshooter.c   \
+   compositor/text-backend.c
 
 # Track this dependency explicitly instead of using BUILT_SOURCES.  We
 # add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
@@ -220,10 +220,10 @@ endif
 endif # BUILD_WESTON_LAUNCH
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = src/weston.pc src/libweston-${LIBWESTON_ABI_VERSION}.pc
+pkgconfig_DATA = compositor/weston.pc src/libweston-${LIBWESTON_ABI_VERSION}.pc
 
 wayland_sessiondir = $(datadir)/wayland-sessions
-dist_wayland_session_DATA = src/weston.desktop
+dist_wayland_session_DATA = compositor/weston.desktop
 
 libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION}
 libwestoninclude_HEADERS = \
@@ -242,7 +242,7 @@ libwestoninclude_HEADERS =  \
shared/platform.h
 
 westonincludedir = $(includedir)/weston
-westoninclude_HEADERS = src/weston.h
+westoninclude_HEADERS = compositor/weston.h
 
 if ENABLE_IVI_SHELL
 westoninclude_HEADERS +=   \
@@ -401,9 +401,9 @@ cms_static_la_LDFLAGS = -module -avoid-version
 cms_static_la_LIBADD = $(COMPOSITOR_LIBS) $(LCMS_LIBS) libshared.la
 cms_static_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LCMS_CFLAGS)
 cms_static_la_SOURCES =\
-   src/cms-static.c\
-   src/cms-helper.c\
-   src/cms-helper.h\
+   compositor/cms-static.c \
+   compositor/cms-helper.c \
+   compositor/cms-helper.h \
shared/helpers.h
 if ENABLE_COLORD
 module_LTLIBRARIES += cms-colord.la
@@ -411,9 +411,9 @@ 

[PATCH weston 0/2] Separate weston from libweston

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

After these two patches, we have weston-the-compositor sources in compositor/,
and libweston sources in libweston/.

These patches are on top of my backend clean-up series.

Since these patches have been generated with -M and so probably cannot be
applied from email, I made the branch available at:
https://git.collabora.com/cgit/user/pq/weston.git/log/?h=migrate


Thanks,
pq

Pekka Paalanen (2):
  Move weston source to compositor/
  Rename src/ to libweston/

 Makefile.am | 208 ++--
 clients/cliptest.c  |   2 +-
 {src => compositor}/cms-colord.c|   0
 {src => compositor}/cms-helper.c|   0
 {src => compositor}/cms-helper.h|   0
 {src => compositor}/cms-static.c|   0
 {src => compositor}/main.c  |   0
 {src => compositor}/systemd-notify.c|   0
 {src => compositor}/text-backend.c  |   0
 {src => compositor}/weston-screenshooter.c  |   0
 {src => compositor}/weston.desktop  |   0
 {src => compositor}/weston.h|   0
 {src => compositor}/weston.pc.in|   0
 configure.ac|   4 +-
 desktop-shell/shell.c   |   2 +-
 ivi-shell/hmi-controller.c  |   2 +-
 ivi-shell/ivi-layout.c  |   2 +-
 ivi-shell/ivi-shell.c   |   2 +-
 {src => libweston}/animation.c  |   0
 {src => libweston}/bindings.c   |   0
 {src => libweston}/clipboard.c  |   0
 {src => libweston}/compositor-drm.c |   0
 {src => libweston}/compositor-drm.h |   0
 {src => libweston}/compositor-fbdev.c   |   0
 {src => libweston}/compositor-fbdev.h   |   0
 {src => libweston}/compositor-headless.c|   0
 {src => libweston}/compositor-headless.h|   0
 {src => libweston}/compositor-rdp.c |   0
 {src => libweston}/compositor-rdp.h |   0
 {src => libweston}/compositor-wayland.c |   0
 {src => libweston}/compositor-wayland.h |   0
 {src => libweston}/compositor-x11.c |   0
 {src => libweston}/compositor-x11.h |   0
 {src => libweston}/compositor.c |   0
 {src => libweston}/compositor.h |   0
 {src => libweston}/data-device.c|   0
 {src => libweston}/dbus.c   |   0
 {src => libweston}/dbus.h   |   0
 {src => libweston}/gl-renderer.c|   0
 {src => libweston}/gl-renderer.h|   0
 {src => libweston}/input.c  |   0
 {src => libweston}/launcher-direct.c|   0
 {src => libweston}/launcher-impl.h  |   0
 {src => libweston}/launcher-logind.c|   0
 {src => libweston}/launcher-util.c  |   0
 {src => libweston}/launcher-util.h  |   0
 {src => libweston}/launcher-weston-launch.c |   0
 {src => libweston}/libbacklight.c   |   0
 {src => libweston}/libbacklight.h   |   0
 {src => libweston}/libinput-device.c|   0
 {src => libweston}/libinput-device.h|   0
 {src => libweston}/libinput-seat.c  |   0
 {src => libweston}/libinput-seat.h  |   0
 {src => libweston}/libweston.pc.in  |   0
 {src => libweston}/linux-dmabuf.c   |   0
 {src => libweston}/linux-dmabuf.h   |   0
 {src => libweston}/log.c|   0
 {src => libweston}/noop-renderer.c  |   0
 {src => libweston}/pixman-renderer.c|   0
 {src => libweston}/pixman-renderer.h|   0
 {src => libweston}/screen-share.c   |   0
 {src => libweston}/screenshooter.c  |   0
 {src => libweston}/spring-tool.c|   0
 {src => libweston}/timeline-object.h|   0
 {src => libweston}/timeline.c   |   0
 {src => libweston}/timeline.h   |   0
 {src => libweston}/vaapi-recorder.c |   0
 {src => libweston}/vaapi-recorder.h |   0
 {src => libweston}/version.h.in |   0
 {src => libweston}/vertex-clipping.c|   0
 {src => libweston}/vertex-clipping.h|   0
 {src => libweston}/weston-egl-ext.h |   0
 {src => libweston}/weston-launch.c  |   0
 {src => libweston}/weston-launch.h  |   0
 {src => libweston}/zoom.c   |   0
 tests/ivi_layout-internal-test.c|   2 +-
 tests/ivi_layout-test-plugin.c  |   4 +-
 tests/surface-global-test.c |   2 +-
 tests/surface-test.c|   2 +-
 tests/vertex-clip-test.c|   2 +-
 tests/weston-test.c |   6 +-
 xwayland/launcher.c |   2 +-
 xwayland/xwayland.h |   2 +-
 83 files changed, 122 insertions(+), 122 deletions(-)
 rename {src => compositor}/cms-colord.c (100%)
 rename {src => compositor}/cms-helper.c (100%)
 rename {src => 

[PATCH weston 2/4] README: minor the libweston ABI/API documentation

2016-06-03 Thread Emil Velikov
From: Emil Velikov 

Signed-off-by: Emil Velikov 
---
 README | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/README b/README
index 76be7b9..b8aa2e0 100644
--- a/README
+++ b/README
@@ -41,25 +41,25 @@ continue evolving through many Weston releases before it 
achieves a
 stable API and feature completeness.
 
 
-API (in)stability and parallel installability
--
+API/ABI (in)stability and parallel installability
+-
 
 As libweston's API surface is huge, it is impossible to get it right
-in one go. Therefore developers reserve the right to break the API
+in one go. Therefore developers reserve the right to break the API/ABI
 between every 1.x.0 Weston release (minor version bumps), just like
 Weston's plugin API does. For git snapshots of the master branch, the
-API can break any time without warning or version bump.
+API/ABI can break any time without warning or version bump.
 
 Libweston API or ABI will not be broken between Weston's stable
 releases 1.x.0 and 1.x.y, where y < 90.
 
-To make things tolerable for libweston users despite ABI breakages,
+To make things tolerable for libweston users despite API/ABI breakages,
 libweston is designed to be perfectly parallel-installable. An
-ABI-version is defined for libweston, and it is bumped for releases as
-needed. Different ABI-versions of libweston can be installed in
-parallel, so that external projects can easily depend on a particular
-ABI-version, and they do not have to fight over which ABI-version is
-installed in a user's system. This allows a user to install many
+API/ABI-version is defined for libweston, and it is bumped for releases as
+needed. Different non-backward compatible ABI versions of libweston can be
+installed in parallel, so that external projects can easily depend on a
+particular ABI-version. Thus they do not have to fight over which ABI-version
+is installed in a user's system. This allows a user to install many
 different compositors each requiring a different libweston ABI-version
 without tricks or conflicts.
 
@@ -157,7 +157,7 @@ would be roughly like this:
 - and possibly more...
 
 Everything should be parallel-installable across libweston
-ABI-versions, except those explicitly mentioned.
+major ABI-versions, except those explicitly mentioned.
 
 Weston's build may not sanely allow this yet, but this is the
 intention.
-- 
2.8.2

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[RFC weston 4/4] WIP: libweston: rework versioning scheme

2016-06-03 Thread Emil Velikov
From: Emil Velikov 

Use libweston-$major.so.0.$minor.$patch over the current scheme.

It allows for separation (distinction) of the backwards incompatible
changes from forward compatible feature/bugfix ones.

TODO:
 - Check if we need the -@LIBWESTON_VERSION_MAJOR@ headers changes.
 - Check where do we want to use @foo@, ${foo} and $(foo).

Signed-off-by: Emil Velikov 
---
 Makefile.am  | 27 ++-
 configure.ac |  8 ++--
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d1d2178..99c5bfe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ noinst_PROGRAMS =
 libexec_PROGRAMS =
 moduledir = $(libdir)/weston
 module_LTLIBRARIES =
-libweston_moduledir = $(libdir)/libweston-${LIBWESTON_ABI_VERSION}
+libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_VERSION_MAJOR)
 libweston_module_LTLIBRARIES =
 noinst_LTLIBRARIES =
 BUILT_SOURCES =
@@ -61,15 +61,16 @@ CLEANFILES = weston.ini \
internal-screenshot-00.png  \
$(BUILT_SOURCES)
 
-lib_LTLIBRARIES = libweston.la
-libweston_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
-libweston_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
-libweston_la_LIBADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
+lib_LTLIBRARIES = libweston-@LIBWESTON_VERSION_MAJOR@.la
+libweston_@LIBWESTON_VERSION_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
+libweston_@LIBWESTON_VERSION_MAJOR@_la_CFLAGS = $(AM_CFLAGS) 
$(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
+libweston_@LIBWESTON_VERSION_MAJOR@_la_LIBADD = $(COMPOSITOR_LIBS) 
$(LIBUNWIND_LIBS) \
$(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) \
$(LIBINPUT_BACKEND_LIBS) libshared.la
-libweston_la_LDFLAGS = -release ${LIBWESTON_ABI_VERSION}
+libweston_@LIBWESTON_VERSION_MAJOR@_la_LDFLAGS = -version-info 
0:$(LIBWESTON_VERSION_MICRO):$(LIBWESTON_VERSION_PATCH)
 
-libweston_la_SOURCES = \
+
+libweston_@LIBWESTON_VERSION_MAJOR@_la_SOURCES =   
\
src/git-version.h   \
src/log.c   \
src/compositor.c\
@@ -119,7 +120,7 @@ systemd_notify_la_SOURCES = \
src/compositor.h
 endif
 
-nodist_libweston_la_SOURCES =  \
+nodist_libweston_@LIBWESTON_VERSION_MAJOR@_la_SOURCES =
\
protocol/weston-screenshooter-protocol.c\
protocol/weston-screenshooter-server-protocol.h \
protocol/text-cursor-position-protocol.c\
@@ -135,7 +136,7 @@ nodist_libweston_la_SOURCES =   
\
protocol/linux-dmabuf-unstable-v1-protocol.c\
protocol/linux-dmabuf-unstable-v1-server-protocol.h
 
-BUILT_SOURCES += $(nodist_libweston_la_SOURCES)
+BUILT_SOURCES += $(nodist_libweston_@LIBWESTON_VERSION_MAJOR@_la_SOURCES)
 
 bin_PROGRAMS += weston
 
@@ -145,7 +146,7 @@ weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON
\
 weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
 weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
$(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
-   -lm libshared.la libweston.la
+   -lm libshared.la libweston-@LIBWESTON_VERSION_MAJOR@.la
 
 weston_SOURCES =   \
src/main.c  \
@@ -220,13 +221,13 @@ endif
 endif # BUILD_WESTON_LAUNCH
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = src/weston.pc src/libweston-${LIBWESTON_ABI_VERSION}.pc
+pkgconfig_DATA = src/weston.pc src/libweston-@LIBWESTON_VERSION_MAJOR@.pc
 
 wayland_sessiondir = $(datadir)/wayland-sessions
 dist_wayland_session_DATA = src/weston.desktop
 
-libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION}
-libwestoninclude_HEADERS = \
+libweston_@LIBWESTON_VERSION_MAJOR@includedir = 
$(includedir)/libweston-$(LIBWESTON_VERSION_MAJOR)
+libweston_@LIBWESTON_VERSION_MAJOR@include_HEADERS =   
\
src/version.h   \
src/compositor.h\
src/compositor-drm.h\
diff --git a/configure.ac b/configure.ac
index 2be2277..78457be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,9 @@ m4_define([weston_minor_version], [11])
 m4_define([weston_micro_version], [90])
 m4_define([weston_version],
   [weston_major_version.weston_minor_version.weston_micro_version])
-m4_define([libweston_abi_version], [0])
+m4_define([libweston_major_version], [0])
+m4_define([libweston_minor_version], [0])
+m4_define([libweston_micro_version], [0])
 
 AC_PREREQ([2.64])
 AC_INIT([weston],
@@ -18,7 +20,9 @@ AC_SUBST([WESTON_VERSION_MAJOR], 

[PATCH weston 1/4] README: clarify libweston purpose/goals.

2016-06-03 Thread Emil Velikov
From: Emil Velikov 

v2: Rewrap, add a couple of missing words (Pekka).

Signed-off-by: Emil Velikov 
---
 README | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/README b/README
index 110a14b..76be7b9 100644
--- a/README
+++ b/README
@@ -73,17 +73,17 @@ http://ometer.com/parallel.html
 Libweston design goals
 --
 
-The high-level goal of libweston is that what used to be shell plugins
-will be main executables. Instead of launching 'weston' with various
-arguments to choose the shell, one would be launching
-'weston-desktop', 'weston-ivi', 'orbital', etc. The main executable
-(the hosting program) links to libweston for a fundamental compositor
-implementation. Libweston is also intended for use by other projects
-who want to create new "Wayland WMs".
-
-The libweston API/ABI will be separating the shell logic and main
-program from the rest of the "Weston compositor" (libweston
-internals).
+The high-level goal of libweston is to decouple the compositor from
+the the shell logic (what used to be shell plugins).
+
+Thus the instead of having a single 'weston' launched with various
+arguments to choose the shell, one would be launching 'weston-desktop',
+'weston-ivi', 'orbital', etc. The main executable (the hosting program)
+will implement the shell, while libweston will be used for a fundamental
+compositor implementation.
+
+Libweston is also intended for use by other projects who want to create
+new "Wayland WMs".
 
 Details:
 
-- 
2.8.2

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[RFC weston 3/4] XXX: README: Mention bits that we really want for libweston

2016-06-03 Thread Emil Velikov
From: Emil Velikov 

---
 README | 12 
 1 file changed, 12 insertions(+)

diff --git a/README b/README
index b8aa2e0..e411343 100644
--- a/README
+++ b/README
@@ -161,3 +161,15 @@ major ABI-versions, except those explicitly mentioned.
 
 Weston's build may not sanely allow this yet, but this is the
 intention.
+
+XXX: Document the versioning scheme properly
+What breaks, what doesn't. When do we bump major, minor and patch.
+
+XXX: Note why should new symbols (API) be guarded by LIBWESTON_API_VERSION >= 
$VERSION macros.
+
+It allows us to add new features/API without any risk of being breaking things.
+
+broke when I reverted to version X" because they have explicitly requested.
+What/how ? Simple, anyone that uses the new API explicitly annotates the verion
+they which to use. Thus there won't be any issues of the sort "things broke
+when I reverted to using version X-Y" as they _explicitly_ request version X 
;-)
-- 
2.8.2

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH 0/4] libweston inspired fixes (?)

2016-06-03 Thread Emil Velikov
Hi all,

Seeing that libweston have landed, I've noticed a few things that seemed
odd.
 - libweston.so is installed alongside the libweston-0.so one.
 - Current versioning scheme does not attribute for fwd compat feature 
(minor) and bugfix (patch) version bumps.

So here it is. A short series that starts with minor README updates, 
adds a few notes about what more we want to document and the actual 
rework.

Please consider the latter two patches as RFC and point out as many 
issues as you can see with the ideas they propose/introduce.

Thanks
Emil

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 0/5] Clean up after backend config conversion

2016-06-03 Thread Quentin Glidic

On 03/06/2016 14:41, Pekka Paalanen wrote:

From: Pekka Paalanen 

Now that the rpi-backend is gone, we can clean this temporary stuff out, and
start using an enum-based backend selection.


Thanks,
pq

Pekka Paalanen (5):
  main: remove load_backend_old()
  compositor,main: use weston_compositor_load_backend()
  libweston: remove unused backend_init() arguments
  libweston: use enum to choose the backend
  main: remove unused argument from backend loaders

 src/compositor-drm.c  |  2 --
 src/compositor-fbdev.c|  8 ++---
 src/compositor-headless.c |  2 --
 src/compositor-rdp.c  |  3 +-
 src/compositor-wayland.c  |  8 ++---
 src/compositor-x11.c  |  2 --
 src/compositor.c  | 39 
 src/compositor.h  | 16 +++--
 src/main.c| 92 ++-
 9 files changed, 86 insertions(+), 86 deletions(-)



Quite straightforward.

The whole series is:
Reviewed-by: Quentin Glidic 

--

Quentin “Sardem FF7” Glidic
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston 2/5] compositor, main: use weston_compositor_load_backend()

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

Move load_backend_new() from main.c to weston_compositor_load_backend()
in compositor.c.

This makes libweston load its own backends without leaking the details
to the user.

Signed-off-by: Pekka Paalanen 
---
 src/compositor.c | 30 ++
 src/compositor.h |  4 
 src/main.c   | 42 ++
 3 files changed, 40 insertions(+), 36 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 3904ef0..8ecc8d2 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4866,3 +4866,33 @@ weston_compositor_get_user_data(struct weston_compositor 
*compositor)
 {
return compositor->user_data;
 }
+
+/** Load a backend into a weston_compositor
+ *
+ * A backend must be loaded to make a weston_compositor work. A backend
+ * provides input and output capabilities, and determines the renderer to use.
+ *
+ * \param compositor A compositor that has not had a backend loaded yet.
+ * \param backend Name of the backend file.
+ * \param config_base A pointer to a backend-specific configuration
+ * structure's 'base' member.
+ *
+ * \return 0 on success, or -1 on error.
+ */
+WL_EXPORT int
+weston_compositor_load_backend(struct weston_compositor *compositor,
+  const char *backend,
+  struct weston_backend_config *config_base)
+{
+   int (*backend_init)(struct weston_compositor *c,
+   int *argc, char *argv[],
+   struct weston_config *config,
+   struct weston_backend_config *config_base);
+
+   backend_init = weston_load_module(backend, "backend_init");
+   if (!backend_init)
+   return -1;
+
+   return backend_init(compositor, NULL, NULL, NULL, config_base);
+}
+
diff --git a/src/compositor.h b/src/compositor.h
index de8a3b6..bec0112 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -1466,6 +1466,10 @@ void
 weston_compositor_destroy(struct weston_compositor *ec);
 struct weston_compositor *
 weston_compositor_create(struct wl_display *display, void *user_data);
+int
+weston_compositor_load_backend(struct weston_compositor *compositor,
+  const char *backend,
+  struct weston_backend_config *config_base);
 void
 weston_compositor_exit(struct weston_compositor *ec);
 void *
diff --git a/src/main.c b/src/main.c
index 8bf824e..27276ff 100644
--- a/src/main.c
+++ b/src/main.c
@@ -909,36 +909,6 @@ handle_exit(struct weston_compositor *c)
wl_display_terminate(c->wl_display);
 }
 
-/** Main module call-point for backends.
- *
- * All backends should use this routine to access their init routine.
- * Backends may subclass weston_backend_config to add their own
- * configuration data, setting the major/minor version in config_base
- * accordingly.
- *
- * The config_base object should be treated as temporary, and any data
- * copied out of it by backend_init before returning.  The load_backend_new
- * callers may then free the config_base object.
- *
- * NOTE: This is a temporary function intended to eventually be replaced
- * by weston_compositor_load_backend().
- */
-static int
-load_backend_new(struct weston_compositor *compositor, const char *backend,
-struct weston_backend_config *config_base)
-{
-   int (*backend_init)(struct weston_compositor *c,
-   int *argc, char *argv[],
-   struct weston_config *config,
-   struct weston_backend_config *config_base);
-
-   backend_init = weston_load_module(backend, "backend_init");
-   if (!backend_init)
-   return -1;
-
-   return backend_init(compositor, NULL, NULL, NULL, config_base);
-}
-
 static enum weston_drm_backend_output_mode
 drm_configure_output(struct weston_compositor *c,
 bool use_current_mode,
@@ -1033,7 +1003,7 @@ load_drm_backend(struct weston_compositor *c, const char 
*backend,
config.configure_output = drm_configure_output;
config.configure_device = configure_input_device;
 
-   ret = load_backend_new(c, backend, );
+   ret = weston_compositor_load_backend(c, backend, );
 
free(config.gbm_format);
free(config.seat_id);
@@ -1072,7 +1042,7 @@ load_headless_backend(struct weston_compositor *c, char 
const * backend,
config.base.struct_size = sizeof(struct weston_headless_backend_config);
 
/* load the actual wayland backend and configure it */
-   ret = load_backend_new(c, backend, );
+   ret = weston_compositor_load_backend(c, backend, );
 
return ret;
 }
@@ -1117,7 +1087,7 @@ load_rdp_backend(struct weston_compositor *c, char const 
* backend,
 
parse_options(rdp_options, ARRAY_LENGTH(rdp_options), argc, argv);
 
-   ret = load_backend_new(c, backend, );
+   

[PATCH weston 5/5] main: remove unused argument from backend loaders

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

There is no need to pass the backend name string to these functions
anymore.

Signed-off-by: Pekka Paalanen 
---
 src/main.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/main.c b/src/main.c
index 9e970d6..193a845 100644
--- a/src/main.c
+++ b/src/main.c
@@ -976,7 +976,7 @@ configure_input_device(struct weston_compositor *compositor,
 }
 
 static int
-load_drm_backend(struct weston_compositor *c, const char *backend,
+load_drm_backend(struct weston_compositor *c,
 int *argc, char **argv, struct weston_config *wc)
 {
struct weston_drm_backend_config config = {{ 0, }};
@@ -1013,7 +1013,7 @@ load_drm_backend(struct weston_compositor *c, const char 
*backend,
 }
 
 static int
-load_headless_backend(struct weston_compositor *c, char const * backend,
+load_headless_backend(struct weston_compositor *c,
  int *argc, char **argv, struct weston_config *wc)
 {
struct weston_headless_backend_config config = {{ 0, }};
@@ -1067,7 +1067,7 @@ weston_rdp_backend_config_init(struct 
weston_rdp_backend_config *config)
 }
 
 static int
-load_rdp_backend(struct weston_compositor *c, char const * backend,
+load_rdp_backend(struct weston_compositor *c,
int *argc, char *argv[], struct weston_config *wc)
 {
struct weston_rdp_backend_config config  = {{ 0, }};
@@ -1100,7 +1100,7 @@ load_rdp_backend(struct weston_compositor *c, char const 
* backend,
 }
 
 static int
-load_fbdev_backend(struct weston_compositor *c, char const * backend,
+load_fbdev_backend(struct weston_compositor *c,
  int *argc, char **argv, struct weston_config *wc)
 {
struct weston_fbdev_backend_config config = {{ 0, }};
@@ -1160,7 +1160,7 @@ weston_x11_backend_config_append_output_config(struct 
weston_x11_backend_config
 }
 
 static int
-load_x11_backend(struct weston_compositor *c, char const * backend,
+load_x11_backend(struct weston_compositor *c,
 int *argc, char **argv, struct weston_config *wc)
 {
struct weston_x11_backend_output_config default_output;
@@ -1475,7 +1475,7 @@ load_wayland_backend_config(struct weston_compositor 
*compositor, int *argc,
 }
 
 static int
-load_wayland_backend(struct weston_compositor *c, char const * backend,
+load_wayland_backend(struct weston_compositor *c,
 int *argc, char **argv, struct weston_config *wc)
 {
struct weston_wayland_backend_config config = {{ 0, }};
@@ -1500,17 +1500,17 @@ load_backend(struct weston_compositor *compositor, 
const char *backend,
 int *argc, char **argv, struct weston_config *config)
 {
if (strstr(backend, "headless-backend.so"))
-   return load_headless_backend(compositor, backend, argc, argv, 
config);
+   return load_headless_backend(compositor, argc, argv, config);
else if (strstr(backend, "rdp-backend.so"))
-   return load_rdp_backend(compositor, backend, argc, argv, 
config);
+   return load_rdp_backend(compositor, argc, argv, config);
else if (strstr(backend, "fbdev-backend.so"))
-   return load_fbdev_backend(compositor, backend, argc, argv, 
config);
+   return load_fbdev_backend(compositor, argc, argv, config);
else if (strstr(backend, "drm-backend.so"))
-   return load_drm_backend(compositor, backend, argc, argv, 
config);
+   return load_drm_backend(compositor, argc, argv, config);
else if (strstr(backend, "x11-backend.so"))
-   return load_x11_backend(compositor, backend, argc, argv, 
config);
+   return load_x11_backend(compositor, argc, argv, config);
else if (strstr(backend, "wayland-backend.so"))
-   return load_wayland_backend(compositor, backend, argc, argv, 
config);
+   return load_wayland_backend(compositor, argc, argv, config);
 
weston_log("Error: unknown backend \"%s\"\n", backend);
return -1;
-- 
2.7.3

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston 4/5] libweston: use enum to choose the backend

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

Change weston_compositor_load_backend() to use an enum to choose the
backend.

The caller no longer needs to know what the backend DSO is called in the
file system. Custom backends cannot be laoded anymore, as the loading
path is now always either LIBWESTON_MODULEDIR, or formed from
$WESTON_BUILD_DIR.

Signed-off-by: Pekka Paalanen 
---
 src/compositor.c | 16 ++--
 src/compositor.h | 12 +++-
 src/main.c   | 18 --
 3 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 07874f6..44126dd 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4867,6 +4867,15 @@ weston_compositor_get_user_data(struct weston_compositor 
*compositor)
return compositor->user_data;
 }
 
+static const char * const backend_map[] = {
+   [WESTON_BACKEND_DRM] =  "drm-backend.so",
+   [WESTON_BACKEND_FBDEV] ="fbdev-backend.so",
+   [WESTON_BACKEND_HEADLESS] = "headless-backend.so",
+   [WESTON_BACKEND_RDP] =  "rdp-backend.so",
+   [WESTON_BACKEND_WAYLAND] =  "wayland-backend.so",
+   [WESTON_BACKEND_X11] =  "x11-backend.so",
+};
+
 /** Load a backend into a weston_compositor
  *
  * A backend must be loaded to make a weston_compositor work. A backend
@@ -4881,13 +4890,16 @@ weston_compositor_get_user_data(struct 
weston_compositor *compositor)
  */
 WL_EXPORT int
 weston_compositor_load_backend(struct weston_compositor *compositor,
-  const char *backend,
+  enum weston_compositor_backend backend,
   struct weston_backend_config *config_base)
 {
int (*backend_init)(struct weston_compositor *c,
struct weston_backend_config *config_base);
 
-   backend_init = weston_load_module(backend, "backend_init");
+   if (backend < 0 || backend >= ARRAY_LENGTH(backend_map))
+   return -1;
+
+   backend_init = weston_load_module(backend_map[backend], "backend_init");
if (!backend_init)
return -1;
 
diff --git a/src/compositor.h b/src/compositor.h
index 25407a2..cccd434 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -1466,9 +1466,19 @@ void
 weston_compositor_destroy(struct weston_compositor *ec);
 struct weston_compositor *
 weston_compositor_create(struct wl_display *display, void *user_data);
+
+enum weston_compositor_backend {
+   WESTON_BACKEND_DRM,
+   WESTON_BACKEND_FBDEV,
+   WESTON_BACKEND_HEADLESS,
+   WESTON_BACKEND_RDP,
+   WESTON_BACKEND_WAYLAND,
+   WESTON_BACKEND_X11,
+};
+
 int
 weston_compositor_load_backend(struct weston_compositor *compositor,
-  const char *backend,
+  enum weston_compositor_backend backend,
   struct weston_backend_config *config_base);
 void
 weston_compositor_exit(struct weston_compositor *ec);
diff --git a/src/main.c b/src/main.c
index 27276ff..9e970d6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1003,7 +1003,8 @@ load_drm_backend(struct weston_compositor *c, const char 
*backend,
config.configure_output = drm_configure_output;
config.configure_device = configure_input_device;
 
-   ret = weston_compositor_load_backend(c, backend, );
+   ret = weston_compositor_load_backend(c, WESTON_BACKEND_DRM,
+);
 
free(config.gbm_format);
free(config.seat_id);
@@ -1042,7 +1043,8 @@ load_headless_backend(struct weston_compositor *c, char 
const * backend,
config.base.struct_size = sizeof(struct weston_headless_backend_config);
 
/* load the actual wayland backend and configure it */
-   ret = weston_compositor_load_backend(c, backend, );
+   ret = weston_compositor_load_backend(c, WESTON_BACKEND_HEADLESS,
+);
 
return ret;
 }
@@ -1087,7 +1089,8 @@ load_rdp_backend(struct weston_compositor *c, char const 
* backend,
 
parse_options(rdp_options, ARRAY_LENGTH(rdp_options), argc, argv);
 
-   ret = weston_compositor_load_backend(c, backend, );
+   ret = weston_compositor_load_backend(c, WESTON_BACKEND_RDP,
+);
 
free(config.bind_address);
free(config.rdp_key);
@@ -1127,7 +1130,8 @@ load_fbdev_backend(struct weston_compositor *c, char 
const * backend,
config.configure_device = configure_input_device;
 
/* load the actual wayland backend and configure it */
-   ret = weston_compositor_load_backend(c, backend, );
+   ret = weston_compositor_load_backend(c, WESTON_BACKEND_FBDEV,
+);
 
free(config.device);
 
@@ -1263,7 +1267,8 @@ load_x11_backend(struct weston_compositor *c, char const 
* backend,
 

[PATCH weston 1/5] main: remove load_backend_old()

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

Not used anymore, all backends are loaded through the new method.

Signed-off-by: Pekka Paalanen 
---
 src/main.c | 20 ++--
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/src/main.c b/src/main.c
index 733bf09..8bf824e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -909,23 +909,6 @@ handle_exit(struct weston_compositor *c)
wl_display_terminate(c->wl_display);
 }
 
-/* Temporary function to be removed when all backends are converted. */
-static int
-load_backend_old(struct weston_compositor *compositor, const char *backend,
-int *argc, char **argv, struct weston_config *wc)
-{
-   int (*backend_init)(struct weston_compositor *c,
-   int *argc, char *argv[],
-   struct weston_config *config,
-   struct weston_backend_config *config_base);
-
-   backend_init = weston_load_module(backend, "backend_init");
-   if (!backend_init)
-   return -1;
-
-   return backend_init(compositor, argc, argv, wc, NULL);
-}
-
 /** Main module call-point for backends.
  *
  * All backends should use this routine to access their init routine.
@@ -1553,7 +1536,8 @@ load_backend(struct weston_compositor *compositor, const 
char *backend,
else if (strstr(backend, "wayland-backend.so"))
return load_wayland_backend(compositor, backend, argc, argv, 
config);
 
-   return load_backend_old(compositor, backend, argc, argv, config);
+   weston_log("Error: unknown backend \"%s\"\n", backend);
+   return -1;
 }
 
 int main(int argc, char *argv[])
-- 
2.7.3

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston 3/5] libweston: remove unused backend_init() arguments

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

Backends do not have access to command line elements nor weston_config
anymore. The use the backend-specific config APIs now.

Signed-off-by: Pekka Paalanen 
---
 src/compositor-drm.c  | 2 --
 src/compositor-fbdev.c| 8 +++-
 src/compositor-headless.c | 2 --
 src/compositor-rdp.c  | 3 +--
 src/compositor-wayland.c  | 8 +++-
 src/compositor-x11.c  | 2 --
 src/compositor.c  | 5 +
 src/compositor.h  | 2 --
 8 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 39d061b..3356ae0 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -3214,8 +3214,6 @@ config_init_to_defaults(struct weston_drm_backend_config 
*config)
 
 WL_EXPORT int
 backend_init(struct weston_compositor *compositor,
-int *argc, char *argv[],
-struct weston_config *wc,
 struct weston_backend_config *config_base)
 {
struct drm_backend *b;
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index f66fe47..3f2347f 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -729,8 +729,7 @@ fbdev_restore(struct weston_compositor *compositor)
 }
 
 static struct fbdev_backend *
-fbdev_backend_create(struct weston_compositor *compositor, int *argc, char 
*argv[],
- struct weston_config *config,
+fbdev_backend_create(struct weston_compositor *compositor,
  struct weston_fbdev_backend_config *param)
 {
struct fbdev_backend *backend;
@@ -828,8 +827,7 @@ config_init_to_defaults(struct weston_fbdev_backend_config 
*config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
-struct weston_config *wc,
+backend_init(struct weston_compositor *compositor,
 struct weston_backend_config *config_base)
 {
struct fbdev_backend *b;
@@ -845,7 +843,7 @@ backend_init(struct weston_compositor *compositor, int 
*argc, char *argv[],
config_init_to_defaults();
memcpy(, config_base, config_base->struct_size);
 
-   b = fbdev_backend_create(compositor, argc, argv, wc, );
+   b = fbdev_backend_create(compositor, );
if (b == NULL)
return -1;
return 0;
diff --git a/src/compositor-headless.c b/src/compositor-headless.c
index ed6c48c..45e47ca 100644
--- a/src/compositor-headless.c
+++ b/src/compositor-headless.c
@@ -259,8 +259,6 @@ config_init_to_defaults(struct 
weston_headless_backend_config *config)
 
 WL_EXPORT int
 backend_init(struct weston_compositor *compositor,
-int *argc, char *argv[],
-struct weston_config *wc,
 struct weston_backend_config *config_base)
 {
struct headless_backend *b;
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 4fc7c74..49d9f10 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -1290,8 +1290,7 @@ config_init_to_defaults(struct weston_rdp_backend_config 
*config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
-struct weston_config *wconfig,
+backend_init(struct weston_compositor *compositor,
 struct weston_backend_config *config_base)
 {
struct rdp_backend *b;
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index fe8b082..5b802f5 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -2169,8 +2169,7 @@ fullscreen_binding(struct weston_keyboard *keyboard, 
uint32_t time,
 
 static struct wayland_backend *
 wayland_backend_create(struct weston_compositor *compositor,
-  struct weston_wayland_backend_config *new_config,
-  int *argc, char *argv[], struct weston_config *config)
+  struct weston_wayland_backend_config *new_config)
 {
struct wayland_backend *b;
struct wl_event_loop *loop;
@@ -2278,8 +2277,7 @@ config_init_to_defaults(struct 
weston_wayland_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
-struct weston_config *config,
+backend_init(struct weston_compositor *compositor,
 struct weston_backend_config *config_base)
 {
struct wayland_backend *b;
@@ -2298,7 +2296,7 @@ backend_init(struct weston_compositor *compositor, int 
*argc, char *argv[],
config_init_to_defaults(_config);
memcpy(_config, config_base, config_base->struct_size);
 
-   b = wayland_backend_create(compositor, _config, argc, argv, config);
+   b = wayland_backend_create(compositor, _config);
 
if (!b)
return -1;
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 629b5f3..5e46e68 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1697,8 +1697,6 @@ config_init_to_defaults(struct weston_x11_backend_config 

[PATCH weston 0/5] Clean up after backend config conversion

2016-06-03 Thread Pekka Paalanen
From: Pekka Paalanen 

Now that the rpi-backend is gone, we can clean this temporary stuff out, and
start using an enum-based backend selection.


Thanks,
pq

Pekka Paalanen (5):
  main: remove load_backend_old()
  compositor,main: use weston_compositor_load_backend()
  libweston: remove unused backend_init() arguments
  libweston: use enum to choose the backend
  main: remove unused argument from backend loaders

 src/compositor-drm.c  |  2 --
 src/compositor-fbdev.c|  8 ++---
 src/compositor-headless.c |  2 --
 src/compositor-rdp.c  |  3 +-
 src/compositor-wayland.c  |  8 ++---
 src/compositor-x11.c  |  2 --
 src/compositor.c  | 39 
 src/compositor.h  | 16 +++--
 src/main.c| 92 ++-
 9 files changed, 86 insertions(+), 86 deletions(-)

-- 
2.7.3

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH libinput] touchpad: restore the hysteresis by default

2016-06-03 Thread Hans de Goede

Hi,

On 03-06-16 03:59, Peter Hutterer wrote:

A large part of the bugs seen right now are related to touchpads jittering too
much. Fixing them one by one is entertaining but time consuming. Right now
the number of touchpads that require a hysteresis seem to outnumber those that
don't, so invert the approach: leave the hysteresis enabled by default but
disable it for those touchpads that don't need it.

Signed-off-by: Peter Hutterer 


Seems like the sensible thing to do to me, and the patch looks good:

Reviewed-by: Hans de Goede 

Regards,

Hans

p.s.

We should try to paint with big strokes when it comes to setting
the new EVDEV_MODEL_PRECISE_TOUCHPAD flag. E.g. since Benjamin
is getting close to getting smbus support for the synaptics
touchpads merged, I can envision a check like this:

if (bus == smbus && vendor == synaptics)
tp->device->model_flags |= EVDEV_MODEL_PRECISE_TOUCHPAD;

And maybe also:

if (vendor == apple)
tp->device->model_flags |= EVDEV_MODEL_PRECISE_TOUCHPAD;

I know you're already doing the later in the hwdb, but I wonder
if that covers all apple devices ?



---
 src/evdev-mt-touchpad.c  | 16 +++-
 src/evdev.c  |  2 +-
 src/evdev.h  |  2 +-
 test/litest-device-synaptics-x1-carbon-3rd.c |  1 +
 udev/90-libinput-model-quirks.hwdb   | 20 ++--
 5 files changed, 8 insertions(+), 33 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index a7b7a68..724de7f 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -2076,27 +2076,17 @@ tp_init_hysteresis(struct tp_dispatch *tp)
 {
int res_x, res_y;

-   if (tp->device->model_flags & EVDEV_MODEL_CYAPA)
-   goto want_hysteresis;
-
-   if (tp->semi_mt &&
-   (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD))
-   goto want_hysteresis;
-
-   if (tp->device->model_flags & EVDEV_MODEL_WOBBLY_TOUCHPAD)
-   goto want_hysteresis;
-
tp->hysteresis_margin.x = 0;
tp->hysteresis_margin.y = 0;

-   return;
+   if (tp->device->model_flags & EVDEV_MODEL_PRECISE_TOUCHPAD)
+   return;

-want_hysteresis:
res_x = tp->device->abs.absinfo_x->resolution;
res_y = tp->device->abs.absinfo_y->resolution;
-
tp->hysteresis_margin.x = res_x/2;
tp->hysteresis_margin.y = res_y/2;
+
return;
 }

diff --git a/src/evdev.c b/src/evdev.c
index cfb4a91..0227f51 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1806,7 +1806,7 @@ evdev_read_model_flags(struct evdev_device *device)
MODEL(CYBORG_RAT),
MODEL(CYAPA),
MODEL(LENOVO_T450_TOUCHPAD),
-   MODEL(WOBBLY_TOUCHPAD),
+   MODEL(PRECISE_TOUCHPAD),
MODEL(TRACKBALL),
{ NULL, EVDEV_MODEL_DEFAULT },
 #undef MODEL
diff --git a/src/evdev.h b/src/evdev.h
index 4fe2cb9..54d7ce7 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -114,7 +114,7 @@ enum evdev_device_model {
EVDEV_MODEL_CYBORG_RAT = (1 << 14),
EVDEV_MODEL_CYAPA = (1 << 15),
EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17),
-   EVDEV_MODEL_WOBBLY_TOUCHPAD = (1 << 18),
+   EVDEV_MODEL_PRECISE_TOUCHPAD = (1 << 18),
EVDEV_MODEL_TRACKBALL = (1 << 19),
 };

diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c 
b/test/litest-device-synaptics-x1-carbon-3rd.c
index 23d9c5b..9d4034d 100644
--- a/test/litest-device-synaptics-x1-carbon-3rd.c
+++ b/test/litest-device-synaptics-x1-carbon-3rd.c
@@ -121,6 +121,7 @@ static const char udev_rule[] =
 "\n"
 "ATTRS{name}==\"litest SynPS/2 Synaptics TouchPad X1C3rd\","
 "ENV{LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD}=\"1\"\n"
+"ENV{LIBINPUT_MODEL_PRECISE_TOUCHPAD}=\"1\"\n"
 "\n"
 "LABEL=\"touchpad_end\"";

diff --git a/udev/90-libinput-model-quirks.hwdb 
b/udev/90-libinput-model-quirks.hwdb
index a50fa3d..821bc16 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -26,18 +26,13 @@ libinput:name:*AlpsPS/2 ALPS DualPoint 
TouchPad:fwversion:800
 libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
  LIBINPUT_ATTR_SIZE_HINT=100x55

-libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:300
-libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:300
-libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310
-libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310
- LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1
-
 ##
 # Apple
 ##
 libinput:touchpad:input:b0003v05ACp*
 libinput:touchpad:input:b0005v05ACp*
  LIBINPUT_MODEL_APPLE_TOUCHPAD=1
+ LIBINPUT_MODEL_PRECISE_TOUCHPAD=1
  LIBINPUT_ATTR_SIZE_HINT=104x75

 libinput:name:*Apple Inc. Apple Internal Keyboard*:dmi:*
@@ -83,14 +78,6 @@ libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*
  

Re: [PATCH weston v3 8/8] Create a libweston-0.so

2016-06-03 Thread Pekka Paalanen
On Thu,  2 Jun 2016 21:48:15 +0300
Giulio Camuffo  wrote:

> This commit also adds a libweston-0.pc file. The -0 is the abi version
> introduced in the previous patch.
> 
> Signed-off-by: Giulio Camuffo 
> Reviewed-by: Quentin Glidic 
> Acked-by: Pekka Paalanen 
> ---
> 
> v3: - read dropped library dependencies for libweston
> - keep log.c where it is
> - put weston.h in HEADERS only
> - drop -lweston from weston.pc's Cflags
> 
>  Makefile.am | 38 --
>  configure.ac|  4 
>  src/libweston.pc.in | 12 
>  src/weston.pc.in|  4 ++--
>  4 files changed, 42 insertions(+), 16 deletions(-)
>  create mode 100644 src/libweston.pc.in

I upgraded this to R-b from me, and pushed it all:
   ca52b31..9e44598  master -> master


Whee!


Thanks,
pq


pgpBq4tnITHNy.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH] scanner: Fix reported executable name to 'wayland-scanner'

2016-06-03 Thread Peter Hutterer
On Fri, Jun 03, 2016 at 09:16:43AM +0800, Jonas Ådahl wrote:
> On Thu, Jun 02, 2016 at 02:42:44PM -0700, Bryce Harrington wrote:
> > 'wayland-scanner -v' (correctly) reports the program as named
> > "wayland-scanner", but 'wayland-scanner -h' was inconsistent, referring
> > to it as './scanner'.
> > 
> > Signed-off-by: Bryce Harrington 
> 
> I guess we could also pass argv and use argv[0], but this works as well.

can't we use program_invocation_short_name here? or is that to GNU-ish?

Cheers,
   Peter
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH wayland-protocols v3] Add screensaver idle inhibitor protocol

2016-06-03 Thread Pekka Paalanen
On Fri, 3 Jun 2016 09:26:24 +0800
Jonas Ådahl  wrote:

> On Thu, Jun 02, 2016 at 02:24:20PM -0700, Bryce Harrington wrote:
> > This interface allows disabling of screensaver/screenblanking on a
> > per-surface basis.  As long as the surface remains visible and
> > non-occluded it blocks the screensaver, etc. from activating on the
> > output(s) that the surface is visible on.
> > 
> > To uninhibit, simply destroy the inhibitor object.
> > 
> > Signed-off-by: Bryce Harrington 
> > ---
> > 
> > v2:
> >  + Rename protocol to idle-inhibit
> > v3:
> >  + Added a destructor for the idle manager
> >  + Changed sub-surface behavior to inherit idle from parent surface
> >  + Various wording changes suggested by pq
> >   

Hi,

you posted the last one marked as v3, so this would have been v4.

> Hi,
> 
> I think this looks sane, I only have a couple of questions that might
> need clarification.
> 
> > 
> >  Makefile.am|  1 +
> >  unstable/idle-inhibit/README   |  4 ++
> >  unstable/idle-inhibit/idle-inhibit-unstable-v1.xml | 84 
> > ++
> >  3 files changed, 89 insertions(+)
> >  create mode 100644 unstable/idle-inhibit/README
> >  create mode 100644 unstable/idle-inhibit/idle-inhibit-unstable-v1.xml
> > 
> > diff --git a/Makefile.am b/Makefile.am
> > index 71d2632..de691db 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -8,6 +8,7 @@ unstable_protocols =
> > \
> > unstable/relative-pointer/relative-pointer-unstable-v1.xml  
> > \
> > unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
> > \
> > unstable/tablet/tablet-unstable-v1.xml  
> > \
> > +   unstable/idle-inhibit/idle-inhibit-unstable-v1.xml  
> > \
> > $(NULL)
> >  
> >  stable_protocols = 
> > \
> > diff --git a/unstable/idle-inhibit/README b/unstable/idle-inhibit/README
> > new file mode 100644
> > index 000..396e871
> > --- /dev/null
> > +++ b/unstable/idle-inhibit/README
> > @@ -0,0 +1,4 @@
> > +Screensaver inhibition protocol
> > +
> > +Maintainers:
> > +Bryce Harrington 
> > diff --git a/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml 
> > b/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml
> > new file mode 100644
> > index 000..af3a911
> > --- /dev/null
> > +++ b/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml
> > @@ -0,0 +1,84 @@
> > +
> > +
> > +
> > +  
> > +Copyright © 2015 Samsung Electronics Co., Ltd
> > +
> > +Permission is hereby granted, free of charge, to any person obtaining a
> > +copy of this software and associated documentation files (the 
> > "Software"),
> > +to deal in the Software without restriction, including without 
> > limitation
> > +the rights to use, copy, modify, merge, publish, distribute, 
> > sublicense,
> > +and/or sell copies of the Software, and to permit persons to whom the
> > +Software is furnished to do so, subject to the following conditions:
> > +
> > +The above copyright notice and this permission notice (including the 
> > next
> > +paragraph) shall be included in all copies or substantial portions of 
> > the
> > +Software.
> > +
> > +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
> > EXPRESS OR
> > +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
> > MERCHANTABILITY,
> > +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT 
> > SHALL
> > +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 
> > OTHER
> > +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> > +DEALINGS IN THE SOFTWARE.
> > +  
> > +
> > +  
> > +
> > +  This interface permits inhibiting the idle behavior such as screen
> > +  blanking, locking, and screensaving.  The client binds the idle 
> > manager
> > +  globally, then creates idle-inhibitor objects for each surface.  
> 
> + for each surface that should inhibit the idle behavior. ?

Yeah, makes sense.

> > +
> > +  Warning! The protocol described in this file is experimental and
> > +  backward incompatible changes may be made. Backward compatible 
> > changes
> > +  may be added together with the corresponding interface version bump.
> > +  Backward incompatible changes are done by bumping the version number 
> > in
> > +  the protocol and interface names and resetting the interface version.
> > +  Once the protocol is to be declared stable, the 'z' prefix and the
> > +  version number in the protocol and interface names are removed and 
> > the
> > +  interface version number is reset.
> > +
> > +
> > +
> > +  
> > +   

Re: [PATCH wayland-web] Remove the special Raspberry Pi guide

2016-06-03 Thread Pekka Paalanen
On Thu, 2 Jun 2016 10:04:44 -0500
Yong Bakos  wrote:

> On Jun 1, 2016, at 5:11 AM, Pekka Paalanen  wrote:
> > 
> > From: Pekka Paalanen 
> > 
> > The Raspberry Pi backend has been removed from Weston. You should try
> > the FOSS driver stack instead.
> > 
> > Signed-off-by: Pekka Paalanen   
> 
> Reviewed-by: Yong Bakos 

Pushed and published:
   cfa1500..2f0006a  master -> master


Thanks,
pq

> 
> > ---
> > building.html|   4 +-
> > raspberrypi.html | 225 
> > ---
> > 2 files changed, 3 insertions(+), 226 deletions(-)
> > delete mode 100644 raspberrypi.html
> > 
> > diff --git a/building.html b/building.html
> > index a669e31..1ff9ea2 100644
> > --- a/building.html
> > +++ b/building.html
> > @@ -55,7 +55,9 @@ Ubuntu 12.04. May be useful for any Debian-derived 
> > system.
> > Linux Mint 17, which is derived from Ubuntu 14.04.
> > 
> > For building Weston for http://www.raspberrypi.org/;>Raspberry
> > -Pi, see Raspberry Pi build guide.
> > +Pi, follow the normal build guide after checking out the
> > +https://dri.freedesktop.org/wiki/VC4/;>FOSS drivers, and use
> > +the DRM-backend.
> > 
> > For building Wayland on Arch note that  > href="https://wiki.archlinux.org/index.php/Docbook#Setting_up_Docbook_in_Arch;>DocBook
> >  dependencies will be needed when building documentation.
> > 
> > diff --git a/raspberrypi.html b/raspberrypi.html
> > deleted file mode 100644
> > index 442a694..000
> > --- a/raspberrypi.html
> > +++ /dev/null


pgpLkp1r5q7wM.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston] Remove Raspberry Pi backend and renderer

2016-06-03 Thread Pekka Paalanen
On Thu, 2 Jun 2016 16:49:12 +0100
Daniel Stone  wrote:

> On 1 June 2016 at 11:11, Pekka Paalanen  wrote:
> > This patch completely removes the Raspberry Pi backend and the renderer.  
> 
> Acked-by: Daniel Stone 

Pushed:
   e57056f..ca52b31  master -> master


Thanks,
pq


pgpO3kaCJG34u.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel