Touch driver woes

John Kjellman jkjellman at comcast.net
Mon Nov 28 12:06:10 PST 2005


Gentlemen,

I have been working on a modified version of the MicroTouch touch screen
driver for a multi-head system.  The current touch driver makes the first
touch simply move focus to that screen and then all subsequent touches
create button events.  My intention is to alter the driver to allow a single
touch on either screen to immediately be recognized with a button event.  I
have searched through the archives and have not come up with anything
useful.

In the current driver the xf86MuTConvert function (converts raw touch screen
coordinates into absolute screen coordinates) calls xf86XInputSetScreen
before returning to cause the screen switch to occur.  xf86XInputSetScreen
appears to just check if miPointerCurrentScreen() matches the screen
associated with the touch driver and if not calls an mi function to set the
current screen.

In my attempts to alter the current behavior I have only been able to come
up with a kludge.  What I have done is check if miPointerCurrentScreen() is
different from my screen and if so I generate motion events to move the
cursor across my screen *before* positioning it to where the touch is and
then generate the button press/release events.  I do this to cause the focus
to switch to my touch screen prior to registering my button press/release
events.

This seems to work fine, but for some strange reason leaves the cursor in
the lower left corner of the screen.  I can not figure out why this happens
as the button press/release events occur at the proper coordinates.

So what I need to know is does anyone have any idea why the cursor is pushed
to the lower left corner of the screen?  Or better yet does anyone know how
to cause the behavior I am looking for without modifying the touch driver?

Take care,
KJohn




More information about the xorg mailing list