Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USB Touch Screen support ?



On Sat, 23 May 2009, Joel Carnat wrote:

> "bad wsmouse event" messages appear as soon as (and each time) I touch the
> screen.
>
> I run (5.0's native) Xorg, twm and an xterm.

There was support in Xfree86 mouse driver for absolute positioning reports
but this has not been carried over to Xorg I don't know why. Look for
bsd_mouse.c.  Actually, there was mention of that on tech-x11 back in
march, NONAKA Kimihiro did produce a patch (attached) but said that the
functionality was marked as deprecated causing compile failure, perhaps
they use a different method now?

iain
Index: external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_mouse.c
===================================================================
RCS file: 
/cvsroot/xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_mouse.c,v
retrieving revision 1.5
diff -u -r1.5 bsd_mouse.c
--- external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_mouse.c 9 Feb 
2009 09:49:39 -0000       1.5
+++ external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/bsd_mouse.c 4 Mar 
2009 17:12:06 -0000
@@ -413,7 +413,7 @@
 {
     MouseDevPtr pMse;
     static struct wscons_event eventList[NUMEVENTS];
-    int n, c; 
+    int n, c, x, y;
     struct wscons_event *event = eventList;
     unsigned char *pBuf;
 
@@ -457,6 +457,28 @@
            dw = event->value;
            break;
 #endif
+       case WSCONS_EVENT_MOUSE_ABSOLUTE_X:
+           miPointerPosition (&x, &y);
+           miPointerAbsoluteCursor (event->value, y, TSTOMILLI(event->time));
+           ++event;
+           continue;
+
+       case WSCONS_EVENT_MOUSE_ABSOLUTE_Y:
+           miPointerPosition (&x, &y);
+           miPointerAbsoluteCursor (x, event->value, TSTOMILLI(event->time));
+           ++event;
+           continue;
+
+       case WSCONS_EVENT_MOUSE_ABSOLUTE_Z:
+           ++event;
+           continue;
+
+#ifdef WSCONS_EVENT_MOUSE_ABSOLUTE_W
+       case WSCONS_EVENT_MOUSE_ABSOLUTE_W:
+           ++event;
+           continue;
+#endif
+
        default:
            xf86Msg(X_WARNING, "%s: bad wsmouse event type=%d\n", pInfo->name,
                    event->type);


Home | Main Index | Thread Index | Old Index