From 352ed8302074a5b7186653deaadd7543d03e4ce5 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Mon, 23 Nov 2009 15:25:11 +0000 Subject: Handle NetBSD's wsmouse ABI versions. From marc at msys dot ch. Thanks. --- src/ws.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ws.c b/src/ws.c index 0a95b24..1db9ab6 100644 --- a/src/ws.c +++ b/src/ws.c @@ -664,6 +664,9 @@ static Bool wsOpen(InputInfoPtr pInfo) { WSDevicePtr priv = (WSDevicePtr)pInfo->private; +#ifdef __NetBSD__ + int version = WSMOUSE_EVENT_VERSION; +#endif DBG(1, ErrorF("WS open %s\n", priv->devName)); pInfo->fd = xf86OpenSerial(pInfo->options); @@ -671,6 +674,13 @@ wsOpen(InputInfoPtr pInfo) xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); return !Success; } +#ifdef __NetBSD__ + if (ioctl(pInfo->fd, WSMOUSEIO_SETVERSION, &version) == -1) { + xf86Msg(X_ERROR, "%s: cannot set wsmouse event version\n", + pInfo->name); + return !Success; + } +#endif return Success; } -- cgit v1.2.3