Touchscreen in DGA mode

Hello.

Sometime ago, Sam wrote:

The X server tends to provide mouse acceleration which isn’t present when
you’re using the DGA driver. In DGA mode, the X server sends raw mouse
events without doing any post-processing (to modify speed, etc.)

We could query the X server for the mouse acceleration options and use
those to modify the DGA mouse events…

Now I’m trying to use a MicroTouch pointer with SDL in DGA mode but i
get some weird behaviour, because the mouse works fine but when i put the
finger on the touchscreen the cursor it’s ok but he reports a wrong
position ! Then I want to know if there is someway to get this raw mouse
events data to check the x and y positions. The fullscreen and windowed
mode the mouse and the touchscreen work fine. Anybody out there use a
touchscreen in DGA mode with SDL ?

Thanks,
Jorge________________________________________________________________________________
Este mensaje se dirige exclusivamente a su destinatario y puede contener
informaci?n CONFIDENCIAL sometida a secreto profesional o cuya divulgaci?n
est? prohibida en virtud de la legislaci?n vigente. Si ha recibido este
mensaje por error, le rogamos que nos lo comunique inmediatamente por esta
misma v?a o por tel?fono (34 93 739 67 00) y proceda a su destrucci?n.
N?tese que el correo electr?nico v?a Internet no permite asegurar ni la
confidencialidad de los mensajes que se transmiten ni la correcta recepci?n
de los mismos. En el caso de que el destinatario de este mensaje no
consintiera la utilizaci?n del correo electr?nico v?a Internet, rogamos lo
ponga en nuestro conocimiento de manera inmediata. This message is
intended exclusively for its addressee and may contain information that is
CONFIDENTIAL and protected by a professional privilege or which disclosure
is prohibited by law. If this message has been received in error, please
immediately notify us via e-mail or by telephone (34 93 739 67 00) and
delete it. Please note that Internet e-mail does not guarantee the
confidentiality or the proper receipt of the messages sent. If the
addressee of this message does not consent to the use of Internet e-mail,
please communicate it to us immediately.


Now I’m trying to use a MicroTouch pointer with SDL in DGA mode but i
get some weird behaviour, because the mouse works fine but when i put the
finger on the touchscreen the cursor it’s ok but he reports a wrong
position ! Then I want to know if there is someway to get this raw mouse
events data to check the x and y positions. The fullscreen and windowed
mode the mouse and the touchscreen work fine. Anybody out there use a
touchscreen in DGA mode with SDL ?

I don’t think the DGA driver reports absolute mouse positions. I think
the X server is translating your motion into mouse deltas … but I’m not
sure about that.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Now I’m trying to use a MicroTouch pointer with SDL in DGA mode but i
get some weird behaviour, because the mouse works fine but when i put
the

finger on the touchscreen the cursor it’s ok but he reports a wrong
position ! Then I want to know if there is someway to get this raw mouse
events data to check the x and y positions. The fullscreen and windowed
mode the mouse and the touchscreen work fine. Anybody out there use a
touchscreen in DGA mode with SDL ?

I don’t think the DGA driver reports absolute mouse positions. I think
the X server is translating your motion into mouse deltas … but I’m not
sure about that.

You’re correct. I have a little test program (‘dga.c’ from the XServer
sources)
using dga functions and i’ve seen this behaviour.

Then, it’s imposible to use a touchscreen in DGA mode as a mouse because i
don’t have a relative position when my finger is not over the touchscreen
only absolute positions.

Thanks,
Jorge

Hello,

It could be a little OT but is there some way to avoid getting mouse events
from SDL ?. If i have that the DGA mode send relative touchscreen/mouse
coordinates then i prefer to read the /dev/ttyS0 (touchscreen port)
directly
deactivating the XServer processing. But if i have in /etc/X11/XF86Config:

InputDevice “MousePS2” "CorePointer"
InputDevice “TouchMu” “SendCoreEvents”

i think that the XServer or some intermediate level eats the events because
i can get events from the serial port, but if i comment the second line the
events
are read fine. Anybody knows someway to deactive or unload the touchscreen
driver from the XServer in runtime and reload again later, using Xlib
functions
or SDL functions ?

Thanks,
Jorge