<div dir="ltr"><div><div><div>Hello<br></div>The detection of the library is automatically done during the configuration. The option is not useful.<br><br>And the use #ifdef HAVE_MTDEV seems to be simpler, if in the future this feature will disappear. <br>
<br></div>What I do ? I send again or I increase the complexity.<br></div>Marc.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/11 Benjamin Tissoires <span dir="ltr"><<a href="mailto:benjamin.tissoires@gmail.com" target="_blank">benjamin.tissoires@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Jun 11, 2013 at 12:40 PM, Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>> wrote:<br>
> On Tue, 11 Jun 2013 12:10:05 +0200<br>
> Benjamin Tissoires <<a href="mailto:benjamin.tissoires@gmail.com">benjamin.tissoires@gmail.com</a>> wrote:<br>
><br>
>> On Tue, Jun 11, 2013 at 9:41 AM, Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>> wrote:<br>
>> > On Tue, 11 Jun 2013 09:01:48 +0200<br>
>> > Benjamin Tissoires <<a href="mailto:benjamin.tissoires@gmail.com">benjamin.tissoires@gmail.com</a>> wrote:<br>
>> ><br>
>> >> On Mon, Jun 10, 2013 at 8:42 AM, Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>> wrote:<br>
>> >> > On Fri, 7 Jun 2013 12:11:14 +0200<br>
>> >> > Marc Chalain <<a href="mailto:marc.chalain@gmail.com">marc.chalain@gmail.com</a>> wrote:<br>
>> >> ><br>
>> >> >> mtdev is not necessary on some device (desktop or set-top-box). For<br>
>> >> >> embedded solution the minimum of dependencies is required. "configure"<br>
>> >> >> accepts the --disable-mtdev option.<br>
>> >> ><br>
>> >> > Hi Marc,<br>
>> >> ><br>
>> >> > with this patch, if weston is compiled with --disable-mtdev, it looks<br>
>> >> > like it will still happily open multitouch devices, expose them to<br>
>> >> > Wayland clients, and feed them garbage or fail or whatever. Right?<br>
>> >><br>
>> >> Hi Pekka,<br>
>> >><br>
>> >> no. mtdev is a compatibility layer for converting very rare<br>
>> >> touchscreen using the multitouch protocol A into the mostly used<br>
>> >> multitouch protocol B.<br>
>> >> To my mind, only legacy devices (ntrig 0001 and few others) use the protocol A.<br>
>> >> So without mtdev, wayland will open and handle most of the multitouch<br>
>> >> screen happily.<br>
>> >><br>
>> >> ><br>
>> >> > I think the proper approach is to change the configure option into<br>
>> >> > --disable-multitouch or --disable-touchscreen, which would not only<br>
>> >> > drop the dependency to mtdev, but also make Weston ignore all<br>
>> >> > touchscreen devices since it will not be able to handle them.<br>
>> >><br>
>> >> Without mtdev, wayland should only ignore multitouch screen not<br>
>> >> presenting the ABS_MT_SLOT axis.<br>
>> >> Those relying on SYN_MT_REPORT do not provide tracking (which is done by mtdev).<br>
>> >><br>
>> >> So my guess is that if you detect multitouch screens by looking at<br>
>> >> ABS_MT_SLOT, then everything will be fine whether or not you have<br>
>> >> mtdev:<br>
>> >> - multitouch B screens will correctly be handled<br>
>> >> - multitouch A screens will be processed as a single touch screen,<br>
>> >> which is not a problem because the kernel provides single touch<br>
>> >> emulation since the early days of multitouch. And if mtdev is present,<br>
>> >> then it will show the ABS_MT_SLOT axis, leading to the previous case.<br>
>> >><br>
>> >> Bonus point, mtdev has not been updated since a long time, and is<br>
>> >> missing the bits allowing you to retrieve the initial per-slot states.<br>
>> >> And you may find useful to retrieve the current states when weston<br>
>> >> launches.<br>
>> ><br>
>> > Thank you for clarifying that, Benjamin.<br>
>> ><br>
>> > Does this mean that we need explicit single-touch support in Weston?<br>
>><br>
>> After giving a quick look at evdev.c, it appears that single touch<br>
>> devices are already treated in the same way tablets (with stylus) are.<br>
>> So, single touch devices are seen from weston in the same way they<br>
>> have been seen in Xorg since the beginning: as absolute input devices.<br>
>><br>
>> Then, it's just a matter of deciding whether we want to inform the<br>
>> client if the source of the event is a finger or a pen.<br>
><br>
> Right... except we do not support tablets at all at the moment. We miss<br>
> the whole protocol for tablets. Wayland (not just Weston) only has<br>
> support for touchscreens so far, in addition to keyboards and relative<br>
> pointing devices.<br>
><br>
> evdev.c's device type recognition is just a handful of ad hoc<br>
> heuristics for now, written only for touschscreens, keyboards, and<br>
> mice/touchpads, and trying to ignore everything else.<br>
<br>
</div></div>Right, the current recognition seems to be even worth than what udev<br>
does (in the sense that it is not a complete characterization, no<br>
offense).<br>
I followed the thread from David Herrman about libinputmapper and<br>
hopefully, we will get in the end a more robust detection of input<br>
devices.<br>
<div class="im"><br>
><br>
>> > I don't think we have that yet. Everything touchy goes through mtdev,<br>
>> > which makes also real single-touch devices look like multitouch devices<br>
>> > except they never report more than one contact. Do I understand that<br>
>> > right?<br>
>><br>
>> evdev.c detects "touch" devices by looking at ABS_MT_SLOT. But mtdev<br>
>> does not transform single touch device into pseudo-multitouch devices.<br>
>> So I would say that those single touch devices are not treated as<br>
>> "touch" today.<br>
><br>
> Ok, so probably they would not work anyway atm.<br>
><br>
> Which means that dropping mtdev loses only some rare multitouch<br>
> devices, which do not advertise ABS_MT_SLOT, and hence will get<br>
> properly ignored. Right?<br>
<br>
</div>right :)<br>
<div class="im"><br>
><br>
> I wonder if single-touch devices get detected as touchpads. Depends on<br>
> if they have any keys, it seems. :-)<br>
<br>
</div>They should not:<br>
the udev mapping for touchpads rely on BTN_TOOL_FINGER, so normally,<br>
the kernel will not set this property for single touch screen (we try<br>
to not break existing in the kernel, and the existing detection<br>
mechanism rely on BTN_TOOL_FINGER...). But again, this is the theory<br>
:)<br>
<br>
Cheers,<br>
Benjamin<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
>> > Marc, in any case, I think you should check that Weston correctly<br>
>> > ignores touch devices it cannot support without mtdev, as per<br>
>> > Benjamin's instructions above.<br>
>> ><br>
>> > Retrieving current state is a matter for another time.<br>
>> ><br>
>><br>
>> Oh yes. FYI, I still did not found the time to finalize the patches for Xorg :)<br>
><br>
><br>
> Thanks,<br>
> pq<br>
</div></div></blockquote></div><br></div>