on BSD, there is no handling of the horizontal component of a scrollball input. The following patch adds this handling for the WSMOUSE and USBMOUSE parts of the mouse driver so that with eg the Apple Mighty Mouse the scrollwheel works in both directions. Index: xorg/xserver/xorg/hw/xfree86/os-support/bsd/bsd_mouse.c =================================================================== RCS file: /cvsroot/xsrc/xorg/xserver/xorg/hw/xfree86/os-support/bsd/bsd_mouse.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 bsd_mouse.c --- xorg/xserver/xorg/hw/xfree86/os-support/bsd/bsd_mouse.c 15 Mar 2006 17:13:34 -0000 1.1.1.1 +++ xorg/xserver/xorg/hw/xfree86/os-support/bsd/bsd_mouse.c 6 Nov 2006 20:31:39 -0000 @@ -56,12 +56,15 @@ #define HUP_GENERIC_DESKTOP 0x0001 #define HUP_BUTTON 0x0009 +#define HUP_CONSUMER 0x000c #define HUG_X 0x0030 #define HUG_Y 0x0031 #define HUG_Z 0x0032 #define HUG_WHEEL 0x0038 +#define HUC_AC_PAN 0x0238 + #define HID_USAGE2(p,u) (((p) << 16) | u) /* The UMS mices have middle button as number 3 */ @@ -431,6 +434,11 @@ 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); @@ -492,6 +500,7 @@ 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; /* w (pan) locator item */ hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */ unsigned char *buffer; } UsbMseRec, *UsbMsePtr; @@ -611,6 +620,7 @@ 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++) { @@ -702,6 +712,9 @@ if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) { } + if (hid_locate(reportDesc, HID_USAGE2(HUP_CONSUMER, HUC_AC_PAN), + hid_input, &pUsbMse->loc_w, pUsbMse->iid) < 0) { + } #else if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, &pUsbMse->loc_x) < 0) { @@ -714,6 +727,9 @@ if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &pUsbMse->loc_z) < 0) { } + if (hid_locate(reportDesc, HID_USAGE2(HUP_CONSUMER, HUC_AC_PAN), + hid_input, &pUsbMse->loc_w) < 0) { + } #endif /* Probe for number of buttons */ for (i = 1; i <= MSE_MAXBUTTONS; i++) {
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Can you redo this as a patch made by git format-patch, and then send it to xorg-devel@lists.freedesktop for review?
Created attachment 39756 [details] [review] git format of the patch
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.