diff options
-rw-r--r-- | src/bsd_mouse.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c index 98e5ff3..a2c8ec7 100644 --- a/src/bsd_mouse.c +++ b/src/bsd_mouse.c @@ -407,7 +407,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)) @@ -432,6 +432,26 @@ wsconsReadInput(InputInfoPtr pInfo) dw = event->value; break; #endif + case WSCONS_EVENT_MOUSE_ABSOLUTE_X: + x = event->value; + xf86PostMotionEvent(pInfo->dev, TRUE, 0, 1, x); + ++event; + continue; + case WSCONS_EVENT_MOUSE_ABSOLUTE_Y: + y = event->value; + xf86PostMotionEvent(pInfo->dev, TRUE, 1, 1, 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: LogMessageVerbSigSafe(X_WARNING, -1, "%s: bad wsmouse event type=%d\n", pInfo->name, |