<div dir="ltr"><div class="gmail_default"><div class="gmail_default">/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: compositor/weston-main.o: undefined reference to symbol 'udev_device_has_tag@@LIBUDEV_183'</div><div class="gmail_default">/usr/lib/libudev.so.1: error adding symbols: DSO missing from command line</div><div class="gmail_default">collect2: error: ld returned 1 exit status</div><div class="gmail_default">make[1]: *** [Makefile:4126: weston] Error 1</div><div class="gmail_default" style="font-size:large"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 5, 2017 at 7:30 PM, Jiayi Zhao <span dir="ltr"><<a href="mailto:jeff.no.zhao@gmail.com" target="_blank">jeff.no.zhao@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 dir="ltr"><div class="gmail_default" style="font-size:large">​​</div><div class="gmail_default">Hmmm, after using udev_device_has_tag(<wbr>udev_device, "ID_INPUT_TOUCHPAD"),</div><div class="gmail_default">I'm getting linking errors. Quick google of this leads to: libraries on the command line should be after the object files being compiled.</div><div class="gmail_default">Is this a bug?</div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 5, 2017 at 7:20 PM, Peter Hutterer <span dir="ltr"><<a href="mailto:peter.hutterer@who-t.net" target="_blank">peter.hutterer@who-t.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-9004883927419932038gmail-">On Sun, Feb 05, 2017 at 07:13:04PM -0500, Jiayi Zhao wrote:<br>
> How would ID_INPUT_TOUCHPAD work?<br>
> I have something like udev_device_has_tag(udev_devic<wbr>e, ID_INPUT_TOUCHPAD)<br>
> Unfortunately, I'm not sure where this constant is declared and its unable<br>
> to find the tag. :/<br>
<br>
</span>it's a udev property name, so use it as a string, not a #define.<br>
value is either 1 or 0, so you do need to check for validity.<br>
<br>
Cheers,<br>
   Peter<br>
<div class="m_-9004883927419932038gmail-HOEnZb"><div class="m_-9004883927419932038gmail-h5"><br>
> On Jan 29, 2017 4:42 PM, "Peter Hutterer" <<a href="mailto:peter.hutterer@who-t.net" target="_blank">peter.hutterer@who-t.net</a>> wrote:<br>
><br>
> > On Fri, Jan 27, 2017 at 09:46:49PM -0500, Jiayi Zhao wrote:<br>
> > > [libinput]<br>
> > > natural_scroll=true<br>
> > ><br>
> > > CHANGES:<br>
> > >  - libinput_device_config_scroll_<wbr>has_natural_scroll() is no longer<br>
> > compared to != 0<br>
> > >  - added configuration option to weston.ini man page<br>
> > ><br>
> > > Signed-off-by: Jiayi Zhao <<a href="mailto:jeff.no.zhao@gmail.com" target="_blank">jeff.no.zhao@gmail.com</a>><br>
> > > ---<br>
> > >  compositor/main.c  | 13 +++++++++++++<br>
> > >  man/weston.ini.man |  3 +++<br>
> > >  <a href="http://weston.ini.in" rel="noreferrer" target="_blank">weston.ini.in</a>      |  1 +<br>
> > >  3 files changed, 17 insertions(+)<br>
> > ><br>
> > > diff --git a/compositor/main.c b/compositor/main.c<br>
> > > index 4bd6e68..84bb8dd 100644<br>
> > > --- a/compositor/main.c<br>
> > > +++ b/compositor/main.c<br>
> > > @@ -1133,6 +1133,8 @@ configure_input_device(struct weston_compositor<br>
> > *compositor,<br>
> > >       struct weston_config *config = wet_get_config(compositor);<br>
> > >       int enable_tap;<br>
> > >       int enable_tap_default;<br>
> > > +     int natural_scroll;<br>
> > > +     int natural_scroll_default;<br>
> > ><br>
> > >       s = weston_config_get_section(conf<wbr>ig,<br>
> > >                                     "libinput", NULL, NULL);<br>
> > > @@ -1147,6 +1149,17 @@ configure_input_device(struct weston_compositor<br>
> > *compositor,<br>
> > >               libinput_device_config_tap_se<wbr>t_enabled(device,<br>
> > >                                                      enable_tap);<br>
> > >       }<br>
> > > +<br>
> > > +     if (libinput_device_config_scroll<wbr>_has_natural_scroll(device)) {<br>
> > > +             natural_scroll_default =<br>
> > > +                     libinput_device_config_<wbr>scroll_get_default_natural_<br>
> > scroll_enabled(<br>
> > > +                             device);<br>
> > > +             weston_config_section_get_boo<wbr>l(s, "natural_scroll",<br>
> > > +                                             &natural_scroll,<br>
> > > +                                             natural_scroll_default);<br>
> > > +             libinput_device_config_<wbr>scroll_set_natural_scroll_<br>
> > enabled(device,<br>
> > > +                                                     natural_scroll);<br>
> > > +     }<br>
> ><br>
> > libinput exposes natural scrolling on mice as well and with this code<br>
> > you're enabling it on any device that has the option. so your mouse<br>
> > wheels will be upside down too when you enable this. That's probably not<br>
> > what you intended, but if so, prepare for angry emails :)<br>
> ><br>
> > there are two options to work around this:<br>
> > * check the udev device for ID_INPUT_TOUCHPAD<br>
> > * assume anything that has tapping is a touchpad<br>
> ><br>
> > Cheers,<br>
> >    Peter<br>
> ><br>
> > >  }<br>
> > ><br>
> > >  static void<br>
> > > diff --git a/man/weston.ini.man b/man/weston.ini.man<br>
> > > index 2edb085..62e0f92 100644<br>
> > > --- a/man/weston.ini.man<br>
> > > +++ b/man/weston.ini.man<br>
> > > @@ -187,6 +187,9 @@ Available configuration are:<br>
> > >  .TP 7<br>
> > >  .BI "enable_tap=" true<br>
> > >  enables tap to click on touchpad devices<br>
> > > +.TP 7<br>
> > > +.BI "natural_scroll=" true<br>
> > > +enables natural scrolling on touchpad devices<br>
> > >  .RS<br>
> > >  .PP<br>
> > ><br>
> > > diff --git a/<a href="http://weston.ini.in" rel="noreferrer" target="_blank">weston.ini.in</a> b/<a href="http://weston.ini.in" rel="noreferrer" target="_blank">weston.ini.in</a><br>
> > > index 257c4ec..f957ec6 100644<br>
> > > --- a/<a href="http://weston.ini.in" rel="noreferrer" target="_blank">weston.ini.in</a><br>
> > > +++ b/<a href="http://weston.ini.in" rel="noreferrer" target="_blank">weston.ini.in</a><br>
> > > @@ -61,6 +61,7 @@ path=@libexecdir@/weston-keybo<wbr>ard<br>
> > ><br>
> > >  #[libinput]<br>
> > >  #enable_tap=true<br>
> > > +#natural_scroll=false<br>
> > ><br>
> > >  #[touchpad]<br>
> > >  #constant_accel_factor = 50<br>
> > > --<br>
> > > 2.10.2<br>
> > ><br>
> > > ______________________________<wbr>_________________<br>
> > > wayland-devel mailing list<br>
> > > <a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedeskto<wbr>p.org</a><br>
> > > <a href="https://lists.freedesktop.org/mailman/listinfo/wayland-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/wayland-devel</a><br>
> > ><br>
> ><br>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>