tech-x11 archive

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

Re: handling absolute X, Y position event in bsd_mouse.c



Hi,

2009/3/5 Iain Hibbert <plunky%rya-online.net@localhost>:

> did you check the bsd_mouse.c from our XFree86 also? I don't know if
> anything there is significant but I had to add the W direction recently
> and I noticed that the absolute pointer had not been carried through to
> xorg. (there was something about ABSOLUTE_Z and ABSOLUTE_W there but I'm
> not sure if they make sense?)

I see our XFree86 source's bsd_mouse.c.ãAll necessary things for me
were written there.
However, I do not know what it is of ABSOLUTE_Z and ABSOLUTE_W.
I have only the device that reports on ABSOLUTE_X and ABSOLUTE_Y.

Regards,
-- 
NONAKA Kimihiro
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