Subject: Re: xsrc/.../bsd_mouse.c
To: None <tech-x11@netbsd.org>
From: Iain Hibbert <plunky@rya-online.net>
List: tech-x11
Date: 11/02/2006 18:42:06
On Tue, 31 Oct 2006, Jeremy C. Reed wrote:

> (By the way, there is a NetBSD tech-x11@ list also. You may get some
> feedback there.)

ah, I should have known - I repost my query below on the right list :)

> Please also submit to bugzilla.freedesktop.org. Thanks.

I think this is for xorg? should I be sending xfree86 fixes anywhere, or
is that dead and gone now? (I'm sure I've seen comments that we are just
about the only consumers of xfree86 now)

--
Hi,
   How specific to NetBSD are the sources in xsrc?

I just bought a new Apple Mighty Mouse (w. Bluetooth) and the horizontal
component of the scrollball is not picked up by the X mouse driver as it
takes no notice of the W value. The following patch fixes this (verified
with xfree) for wsmouse.

Should I also fix the W dir for USBMOUSE? (fairly trivial but I can't
test it)

Would these changes need to be fed upstream someplace, or is it ok to
commit to xsrc?

Is it possible to build and use xorg natively? (my source is some weeks
out of date but I can update)

iain

Index: xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c,v
retrieving revision 1.9
diff -u -r1.9 bsd_mouse.c
--- xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c	18 Mar 2005 14:55:15 -0000	1.9
+++ xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c	31 Oct 2006 19:19:48 -0000
@@ -571,6 +571,11 @@
 	    dz = event->value;
 	    break;
 #endif
+#ifdef WSCONS_EVENT_MOUSE_DELTA_W
+	case WSCONS_EVENT_MOUSE_DELTA_W:
+	    dw = event->value;
+	    break;
+#endif
         case WSCONS_EVENT_MOUSE_ABSOLUTE_X:
             miPointerPosition (&x, &y);
             miPointerAbsoluteCursor (event->value, y, TSTOMILLI(event->time));
@@ -586,6 +591,12 @@
         case WSCONS_EVENT_MOUSE_ABSOLUTE_Z:
             ++event;
             continue;
+
+#ifdef WSCONS_EVENT_MOUSE_ABSOLUTE_W
+	case WSCONS_EVENT_MOUSE_ABSOLUTE_W:
+	    ++event;
+	    continue;
+#endif

 	default:
 	    xf86Msg(X_WARNING, "%s: bad wsmouse event type=%d\n", pInfo->name,
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	31 Oct 2006 19:19:48 -0000
@@ -431,6 +431,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);