<div dir="ltr">Not sure this is the right place for this question but weston does not build when libinput 0.4 is used:<div><br></div><div><div>./autogen.sh --prefix=$WLD \</div><div>      --disable-rpi-compositor \</div><div>
      --enable-libinput-backend \</div><div>      --enable-egl --with-cairo-glesv2 --enable-wayland-compositor \</div><div>      --disable-x11-compositor --disable-fbdev-compositor \</div><div>      --disable-xwayland --disable-xwayland-test \</div>
<div>      --without-x</div></div><div><br></div><div>the config looks great, but then it fails with drm_backend_la-libinput-seat.lo</div><div><br></div><div>Is there any particular dependency I am missing or any flag I should use to build libinput in order to make weston using it?</div>
<div><br></div><div>If I drop `enable-libinput-backend` weston builds and launch without problems.</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jun 24, 2014 at 11:55 PM, Jonas Ådahl <span dir="ltr"><<a href="mailto:jadahl@gmail.com" target="_blank">jadahl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On Wed, Jun 25, 2014 at 02:07:36PM +1000, Peter Hutterer wrote:<br>
> No functional changes, just adjusting for API changes in libinput:<br>
> - libinput_destroy() replaced by libinput_unref()<br>
> - log functions now take a libinput context, userdata is gone<br>
> - udev seat creation is now libinput_udev_create_context() and<br>
>   libinput_udev_assign_seat()<br>
<br>
</div>Applied and pushed, thanks.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jonas<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Signed-off-by: Peter Hutterer <<a href="mailto:peter.hutterer@who-t.net">peter.hutterer@who-t.net</a>><br>
> ---<br>
>  <a href="http://configure.ac" target="_blank">configure.ac</a>        |  2 +-<br>
>  src/libinput-seat.c | 32 +++++++++++++++++++++-----------<br>
>  2 files changed, 22 insertions(+), 12 deletions(-)<br>
><br>
> diff --git a/<a href="http://configure.ac" target="_blank">configure.ac</a> b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
> index b4511fc..648bee8 100644<br>
> --- a/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
> +++ b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
> @@ -160,7 +160,7 @@ AC_ARG_ENABLE(libinput-backend, [  --enable-libinput-backend],,<br>
>  AM_CONDITIONAL([ENABLE_LIBINPUT_BACKEND], [test x$enable_libinput_backend = xyes])<br>
>  if test x$enable_libinput_backend = xyes; then<br>
>    AC_DEFINE([BUILD_LIBINPUT_BACKEND], [1], [Build the libinput input device backend])<br>
> -  PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.3.0])<br>
> +  PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.4.0])<br>
>  fi<br>
><br>
><br>
> diff --git a/src/libinput-seat.c b/src/libinput-seat.c<br>
> index d59ae42..09cf7c7 100644<br>
> --- a/src/libinput-seat.c<br>
> +++ b/src/libinput-seat.c<br>
> @@ -252,8 +252,9 @@ udev_input_enable(struct udev_input *input)<br>
>  }<br>
><br>
>  static void<br>
> -libinput_log_func(enum libinput_log_priority priority, void *user_data,<br>
> -                  const char *format, va_list args)<br>
> +libinput_log_func(struct libinput *libinput,<br>
> +               enum libinput_log_priority priority,<br>
> +               const char *format, va_list args)<br>
>  {<br>
>       weston_vlog(format, args);<br>
>  }<br>
> @@ -268,25 +269,34 @@ udev_input_init(struct udev_input *input, struct weston_compositor *c, struct ud<br>
><br>
>       input->compositor = c;<br>
><br>
> -     libinput_log_set_handler(&libinput_log_func, NULL);<br>
> -<br>
>       log_priority = getenv("WESTON_LIBINPUT_LOG_PRIORITY");<br>
><br>
> +     input->libinput = libinput_udev_create_context(&libinput_interface,<br>
> +                                                    input, udev);<br>
> +     if (!input->libinput) {<br>
> +             return -1;<br>
> +     }<br>
> +<br>
> +     libinput_log_set_handler(input->libinput, &libinput_log_func);<br>
> +<br>
>       if (log_priority) {<br>
>               if (strcmp(log_priority, "debug") == 0) {<br>
> -                     libinput_log_set_priority(LIBINPUT_LOG_PRIORITY_DEBUG);<br>
> +                     libinput_log_set_priority(input->libinput,<br>
> +                                               LIBINPUT_LOG_PRIORITY_DEBUG);<br>
>               } else if (strcmp(log_priority, "info") == 0) {<br>
> -                     libinput_log_set_priority(LIBINPUT_LOG_PRIORITY_INFO);<br>
> +                     libinput_log_set_priority(input->libinput,<br>
> +                                               LIBINPUT_LOG_PRIORITY_INFO);<br>
>               } else if (strcmp(log_priority, "error") == 0) {<br>
> -                     libinput_log_set_priority(LIBINPUT_LOG_PRIORITY_ERROR);<br>
> +                     libinput_log_set_priority(input->libinput,<br>
> +                                               LIBINPUT_LOG_PRIORITY_ERROR);<br>
>               }<br>
>       }<br>
><br>
> -     input->libinput = libinput_udev_create_for_seat(&libinput_interface, input,<br>
> -                                                     udev, seat_id);<br>
> -     if (!input->libinput) {<br>
> +     if (libinput_udev_assign_seat(input->libinput, seat_id) != 0) {<br>
> +             libinput_unref(input->libinput);<br>
>               return -1;<br>
>       }<br>
> +<br>
>       process_events(input);<br>
><br>
>       return udev_input_enable(input);<br>
> @@ -300,7 +310,7 @@ udev_input_destroy(struct udev_input *input)<br>
>       wl_event_source_remove(input->libinput_source);<br>
>       wl_list_for_each_safe(seat, next, &input->compositor->seat_list, base.link)<br>
>               udev_seat_destroy(seat);<br>
> -     libinput_destroy(input->libinput);<br>
> +     libinput_unref(input->libinput);<br>
>  }<br>
><br>
>  static void<br>
> --<br>
> 1.9.3<br>
><br>
> _______________________________________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br></div>