Re: [AD] submission: linux touchscreen driver for allegro

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Correction:
Let me retract that statement, because I honestly don't know which is
better. You may want to stick with using the virtual device.
It probably matters more if you have 2 touchscreens in which case I
don't know if the current code handles that properly.

So choose to keep current patch1 that uses the virtual deviceid or
patch2 which uses the physical deviceid.
whichever you think is best.
Pho75.

On Thu, Oct 16, 2014 at 10:24 AM, Phelius <project.phelius@xxxxxxxxxx> wrote:
> backstory:
> I was getting duplicate events from your linux_touch branch.
> one with deviceid=2 (virtual pointer = master pointer)
> and one with deviceid=11 (physical device = slave pointer)
>
> patch 1:
> I didn't know how to filter out the master deviceid's so my previous
> patch to your linux_touch branch set the filter (in xdisplay.c) for
> the virtual master pointer only.
> This isn't ideal since you can't tell from which specific device the
> event came from.
>
> patch 2:
> I figured out how to filter the event type, so this latest patch
> restores xdisplay.c to get all events and adds the filter in xtouch.c
> instead, so it will ignore the virtual master pointer event
> and take the event that has the real deviceid for the touchscreen.
>
> Thanks,
> Pho75.
>
>
> On Thu, Oct 16, 2014 at 10:15 AM, SiegeLordEx <slabode@xxxxxxxxxx> wrote:
>> Could you comment on how this is better than the current method? I
>> thought the current code already filtered the virtual events.
>>
>> -SL
>>
>> On 10/16/2014 10:12 AM, Phelius wrote:
>>> Attached is a patch which corrects the deviceid for linux touchscreen.
>>> Instead of screening for the virtual master deviceid events,
>>> this will ignore them so we only get events from the physical deviceid.
>>> Thanks,
>>> Pho75.
>>>
>>> On Sun, Oct 12, 2014 at 5:48 PM, Phelius <project.phelius@xxxxxxxxxx> wrote:
>>>> Attached is a patch for SiegeLord's linux_touch branch that fixes an issue.
>>>>
>>>> 1. The xinput events were appearing twice. Once with the deviceid of
>>>> the touchscreen and another with deviceid for the Virtual core pointer
>>>> (see my xinput output below).
>>>> I fixed it by filtering only for the virtual devices. I don't know the
>>>> pro's or con's of doing this vs. filtering for the physical id's, but
>>>> this works for me.
>>>>
>>>> 2. Since Siege is querying all xinput events I added a filter to
>>>> ignore events that don't belong to the affected display.
>>>> I don't know if this is even necessary, but it seemed appropriate. I
>>>> don't have multiple x11 displays to test with.
>>>>
>>>> P.S.:
>>>> I forgot to mention with my previous patch, but the touchscreen can
>>>> have a higher resolution than the display resolution. It might be
>>>> worth a quick mention in the allegro docs,
>>>> in case someone is expecting only integer values.
>>>>
>>>> Thanks,
>>>> Pho75
>>>>
>>>> u15392@xxxxxxxxxx$ xinput
>>>> ⎡ Virtual core pointer                        id=2    [master pointer  (3)]
>>>> ⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
>>>> ⎜   ↳ SYNAPTICS Synaptics Large Touch Screen      id=11    [slave  pointer  (2)]
>>>> ⎜   ↳ SynPS/2 Synaptics TouchPad                  id=13    [slave  pointer  (2)]
>>>> ⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
>>>>      ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
>>>>      ↳ Power Button                                id=6    [slave  keyboard (3)]
>>>>      ↳ Video Bus                                   id=7    [slave  keyboard (3)]
>>>>      ↳ Video Bus                                   id=8    [slave  keyboard (3)]
>>>>      ↳ Power Button                                id=9    [slave  keyboard (3)]
>>>>      ↳ Integrated_Webcam_HD                        id=10    [slave  keyboard (3)]
>>>>      ↳ AT Translated Set 2 keyboard                id=12    [slave  keyboard (3)]
>>>>      ↳ Dell WMI hotkeys                            id=14    [slave  keyboard (3)]
>>>>
>>>>
>>>> On Tue, Sep 30, 2014 at 8:26 AM, SiegeLordEx <slabode@xxxxxxxxxx> wrote:
>>>>>
>>>>> Heya, I just realized that you might not have gotten this message since you're most likely not subscribed to the mailing list... sorry!
>>>>>
>>>>> -SL
>>>>>
>>>>>
>>>>> -------- Original Message --------
>>>>> Subject: Re: [AD] submission: linux touchscreen driver for allegro
>>>>> Date: Sat, 20 Sep 2014 16:24:06 -0400
>>>>> From: SiegeLordEx <slabode@xxxxxxxxxx>
>>>>> To: alleg-developers@xxxxxxxxxx
>>>>>
>>>>> Ok, I've tried it out on a local branch here:
>>>>> https://github.com/SiegeLord/allegro5/tree/linux_touch
>>>>>
>>>>> I made a whole bunch of refactoring to it (mostly moved most of the
>>>>> logic inside xtouch.c in case XInput2 is too hard a dependency to require).
>>>>>
>>>>> I also made one big change. When you masked the events for the touch
>>>>> input, you specified a single device. This was problematic as
>>>>> ALLEGRO_DISPLAYs created before `al_install_touch_input` was called
>>>>> would never receive those events. So, I made the mask take all touch
>>>>> input devices. I don't know how well that works though, since I don't
>>>>> have a device to test this with...
>>>>>
>>>>> Could you check that branch out and see if it still works for you?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> -SL
>>>>>
>>>>> On 09/14/2014 01:26 PM, Phelius wrote:
>>>>>>
>>>>>> Attached is the updated allegro touchscreen support for linux with
>>>>>> corrections applied.
>>>>>> Thanks so SiegeLord for his feedback.
>>>>>> Cheers,
>>>>>> Pho75
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Comprehensive Server Monitoring with Site24x7.
>>>>>> Monitor 10 servers for $9/Month.
>>>>>> Get alerted through email, SMS, voice calls or mobile push notifications.
>>>>>> Take corrective actions from your mobile device.
>>>>>> http://p.sf.net/sfu/Zoho
>>>>>>
>>>>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Comprehensive Server Monitoring with Site24x7.
>> Monitor 10 servers for $9/Month.
>> Get alerted through email, SMS, voice calls or mobile push notifications.
>> Take corrective actions from your mobile device.
>> http://p.sf.net/sfu/Zoho
>> --
>> https://lists.sourceforge.net/lists/listinfo/alleg-developers




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/