Bug 8993 - enable horizontal scrolling with mouse ball
Summary: enable horizontal scrolling with mouse ball
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Mouse (show other bugs)
Version: unspecified
Hardware: x86 (IA32) NetBSD
: high enhancement
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-12 10:01 UTC by Iain HIbbert
Modified: 2018-06-12 19:07 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
git format of the patch (2.17 KB, patch)
2010-10-25 01:29 UTC, Iain HIbbert
no flags Details | Splinter Review

Description Iain HIbbert 2006-11-12 10:01:03 UTC
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++) {
Comment 1 Daniel Stone 2007-02-27 01:34:38 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Jesse Adkins 2010-10-24 18:34:06 UTC
Can you redo this as a patch made by git format-patch, and then send it to xorg-devel@lists.freedesktop for review?
Comment 3 Iain HIbbert 2010-10-25 01:29:24 UTC
Created attachment 39756 [details] [review]
git format of the patch
Comment 4 Adam Jackson 2018-06-12 19:07:08 UTC
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.