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

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


That seems reasonable. I merged it.

Thanks a lot!

-SL

On 10/12/2014 05:48 PM, Phelius 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






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