Module Name: xsrc Committed By: christos Date: Thu Jan 26 22:43:06 UTC 2012
Modified Files: xsrc/external/mit/xf86-input-mouse/dist/src: bsd_mouse.c Log Message: PR/45853: Pierre Pronchery: Add support for absolute positioning (tablets) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c diff -u xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c:1.2 xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c:1.3 --- xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c:1.2 Sat Jul 23 21:22:16 2011 +++ xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c Thu Jan 26 17:43:06 2012 @@ -409,7 +409,7 @@ wsconsReadInput(InputInfoPtr pInfo) n /= sizeof(struct wscons_event); while( n-- ) { int buttons = pMse->lastButtons; - int dx = 0, dy = 0, dz = 0, dw = 0; + int dx = 0, dy = 0, dz = 0, dw = 0, x, y; switch (event->type) { case WSCONS_EVENT_MOUSE_UP: #define BUTBIT (1 << (event->value <= 2 ? 2 - event->value : event->value)) @@ -434,6 +434,30 @@ wsconsReadInput(InputInfoPtr pInfo) dw = event->value; break; #endif + case WSCONS_EVENT_MOUSE_ABSOLUTE_X: + miPointerGetPosition (pInfo->dev, &x, &y); + x = event->value; + miPointerSetPosition (pInfo->dev, &x, &y); + xf86PostMotionEvent(pInfo->dev, TRUE, 0, 2, x, y); + ++event; + continue; + case WSCONS_EVENT_MOUSE_ABSOLUTE_Y: + miPointerGetPosition (pInfo->dev, &x, &y); + y = event->value; + miPointerSetPosition (pInfo->dev, &x, &y); + xf86PostMotionEvent(pInfo->dev, TRUE, 0, 2, x, y); + ++event; + continue; +#ifdef WSCONS_EVENT_MOUSE_ABSOLUTE_Z + case WSCONS_EVENT_MOUSE_ABSOLUTE_Z: + ++event; + continue; +#endif +#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);