summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ws.c10
1 files changed, 10 insertions, 0 deletions
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;
}