summaryrefslogtreecommitdiff
path: root/xserver
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2007-05-26 17:06:16 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2007-05-26 17:06:16 +0000
commitb1b0706f45aa7fcd041d7f0f1abfe18a044f8ab0 (patch)
tree4e545331fb658ca24f9c33e090aba7c77bf8e1b1 /xserver
parent9115084396538615472d09ba93bfc94c21cf95f3 (diff)
Add support for 'W' axis. From "Gareth" garf at loveandnature dot co dot za.
Thanks.
Diffstat (limited to 'xserver')
-rw-r--r--xserver/hw/xfree86/os-support/bsd/bsd_mouse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_mouse.c b/xserver/hw/xfree86/os-support/bsd/bsd_mouse.c
index e1708e62a..b8213c96b 100644
--- a/xserver/hw/xfree86/os-support/bsd/bsd_mouse.c
+++ b/xserver/hw/xfree86/os-support/bsd/bsd_mouse.c
@@ -442,6 +442,11 @@ wsconsReadInput(InputInfoPtr pInfo)
dz = event->value;
break;
#endif
+#ifdef WSCONS_EVENT_MOUSE_DELTA_W
+ case WSCONS_EVENT_MOUSE_DELTA_W:
+ dw = event->value;
+ break;
+#endif
default:
xf86Msg(X_WARNING, "%s: bad wsmouse event type=%d\n", pInfo->name,
event->type);
@@ -503,6 +508,7 @@ typedef struct _UsbMseRec {
hid_item_t loc_x; /* x locator item */
hid_item_t loc_y; /* y locator item */
hid_item_t loc_z; /* z (wheel) locator item */
+ hid_item_t loc_w; /* z (wheel) locator item */
hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */
unsigned char *buffer;
} UsbMseRec, *UsbMsePtr;
@@ -622,6 +628,7 @@ usbReadInput(InputInfoPtr pInfo)
dx = hid_get_data(pBuf, &pUsbMse->loc_x);
dy = hid_get_data(pBuf, &pUsbMse->loc_y);
dz = hid_get_data(pBuf, &pUsbMse->loc_z);
+ dw = hid_get_data(pBuf, &pUsbMse->loc_w);
buttons = 0;
for (n = 0; n < pMse->buttons; n++) {