diff options
author | Matthieu Herrb <matthieu@openbsd.org> | 2009-11-23 15:25:11 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@openbsd.org> | 2009-11-23 15:25:11 +0000 |
commit | 352ed8302074a5b7186653deaadd7543d03e4ce5 (patch) | |
tree | 4367df6b293917f83be023a26c0bfea7aa1b9af9 | |
parent | 09286bc24e9ea3ac6660babd8f3e04dafd7db311 (diff) |
Handle NetBSD's wsmouse ABI versions. From marc at msys dot ch. Thanks.
-rw-r--r-- | src/ws.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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; } |