<div dir="ltr">Found another oddball log: <a href="http://www.winehq.org/pipermail/wine-devel/2013-May/099905.html">http://www.winehq.org/pipermail/wine-devel/2013-May/099905.html</a><div><br></div><div>I don't have any suggestions on what the right solution is... just wanted to make sure you had all the logs.</div>
<div><br></div><div>Regards,</div><div>--John</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Mar 22, 2014 at 12:28 PM, John Klehm <span dir="ltr"><<a href="mailto:xixsimplicityxix@gmail.com" target="_blank">xixsimplicityxix@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">Hello,<div class=""><div><br></div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">>To be able to prioritize we have to change current functions into smth like this:</span><br style="font-family:arial,sans-serif;font-size:13px">

<br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">>get_cursor_type(cursor) { //new function</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">>   can we determine type based on cursor.device? Yes -> return CSR_TYPE_PEN;</span><span style="font-family:arial,sans-serif;font-size:13px"> </span></div>
</div><div><div class="">
<span style="font-family:arial,sans-serif;font-size:13px">>   can we determine type based on </span><a href="http://cursor.name/" style="font-family:arial,sans-serif;font-size:13px" target="_blank">cursor.name</a><span style="font-family:arial,sans-serif;font-size:13px">? Yes -> return CSR_TYPE_ERASER;</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">>    return CSR_TYPE_OTHER;</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">>}</span><br style="font-family:arial,sans-serif;font-size:13px">

<div><br></div></div><div>I worked on this code a little bit back in the day, I remember the detection stuff getting weird due to some odd ball drivers (non-wacom stuff doing strange things).</div><div><br></div><div>Bug <a href="http://bugs.winehq.org/show_bug.cgi?id=11699" target="_blank">http://bugs.winehq.org/show_bug.cgi?id=11699</a> and specifically the log <a href="http://bugs.winehq.org/attachment.cgi?id=13358" target="_blank">http://bugs.winehq.org/attachment.cgi?id=13358</a> of an Acecad table driver's settings.<br>

</div><div><br></div><div>Just thought it might be handy to consider if you were to take a shot at rewriting the detection code.</div><div><br></div><div>Regards,</div><div>--John</div></div></div><div class="HOEnZb"><div class="h5">
<div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Mar 21, 2014 at 4:09 AM, Michael Stefaniuc <span dir="ltr"><<a href="mailto:mstefani@redhat.com" target="_blank">mstefani@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On 03/21/2014 10:04 AM, Eriks Dobelis wrote:<br>
> To be able to prioritize we have to change current functions into smth<br>
> like this:<br>
><br>
> get_cursor_type(cursor) { //new function<br>
>     can we determine type based on cursor.device? Yes -> return<br>
> CSR_TYPE_PEN;<br>
>     can we determine type based on <a href="http://cursor.name" target="_blank">cursor.name</a>? Yes -> return<br>
> CSR_TYPE_ERASER;<br>
>     return CSR_TYPE_OTHER;<br>
> }<br>
><br>
> and rewriting is_stylus  and is_eraser into more simple functions like<br>
> is_stylus(cursor) {<br>
>   return get_cursor_type(cursor) == CSR_TYPE_PEN;<br>
> }<br>
</div>In that case you could actually get rid of the is_* functions;<br>
"get_cursor_type(cursor) == CSR_TYPE_PEN" is as readable.<br>
<br>
bye<br>
        michael<br>
<div><div><br>
><br>
><br>
> On <a href="tel:2014.03.21.%2010" value="+12014032110" target="_blank">2014.03.21. 10</a>:54, Alexandre Julliard wrote:<br>
>> Eriks Dobelis <<a href="mailto:eriks.dobelis@biti.lv" target="_blank">eriks.dobelis@biti.lv</a>> writes:<br>
>><br>
>>> The alternative - just to switch order of checks in<br>
>>> X11DRV_LoadTabletInfo. There is a code fragment:<br>
>>>              /* prefer finding TYPE_PEN(most capable) */<br>
>>>              if (is_stylus(target->name, device_type))<br>
>>>                  cursor.TYPE = CSR_TYPE_PEN;<br>
>>>              else if (is_eraser(target->name, device_type))<br>
>>>                  cursor.TYPE = CSR_TYPE_ERASER;<br>
>>>              else<br>
>>>                  cursor.TYPE = CSR_TYPE_OTHER;<br>
>>><br>
>>> I would need to switch order and check for ERASER first. Problems<br>
>>> would arise if for some device name would be "Pen & Eraser", and type<br>
>>> would be "STYLUS" , and then it would be detected as eraser. In the<br>
>>> proposed patch this problem would not arise as only device is checked<br>
>>> for ERASER. For my specific case both approaches work. Which one you<br>
>>> consider as better?<br>
>> Maybe a better way would be to restructure the checks, and give priority<br>
>> to the type over the name or something like that. The thing is that we<br>
>> don't want to have an is_stylus function that also checks for erasers,<br>
>> and then an is_eraser function with slightly different checks.<br>
>><br>
><br>
><br>
><br>
<br>
<br>
</div></div><span><font color="#888888">--<br>
Michael Stefaniuc                           Tel.: <a href="tel:%2B49-711-96437-199" value="+4971196437199" target="_blank">+49-711-96437-199</a><br>
Supervisor, APAC/EMEA IT Network            Fax.: <a href="tel:%2B49-711-96437-111" value="+4971196437111" target="_blank">+49-711-96437-111</a><br>
--------------------------------------------------------------------<br>
Reg. Adresse: Red Hat GmbH, Werner-von-Siemens-Ring 14, 85630 Grasbrunn<br>
Handelsregister: Amtsgericht Muenchen HRB 153243<br>
Geschäftsführer: Mark Hegarty, Charlie Peters, Michael Cunningham,<br>
                 Charles Cachera<br>
<br>
<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>