Module Name:    xsrc
Committed By:   tsutsui
Date:           Fri Oct  8 17:49:26 UTC 2010

Modified Files:
        xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha: alphaMouse.c
        xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: decMouse.c
        xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast: dreamcastMouse.c
        xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips:
            ews4800mipsMouse.c
        xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc: macppcMouse.c
        xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips: newsmipsMouse.c

Log Message:
Handle WSMOUSEIO_SETVERSION in legacy XFree based MD servers
for workaround until eventual Xorg migration.
Taken from Xhpc as noted in PR xsrc/41619, but tested only on dreamcast.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
    xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c
cvs rdiff -u -r1.1 -r1.2 \
    xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c
cvs rdiff -u -r1.1 -r1.2 \
    xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c
cvs rdiff -u -r1.1 -r1.2 \
    xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
    xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcMouse.c
cvs rdiff -u -r1.1 -r1.2 \
    xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.1	Sun Jan 18 04:13:22 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c	Fri Oct  8 17:49:25 2010
@@ -153,6 +153,19 @@
 		Error ("alphaMouseProc ioctl VUIDSFORMAT");
 		return !Success;
 	    }
+#endif
+
+#ifdef WSMOUSEIO_SETVERSION
+	   {
+               int version = WSMOUSE_EVENT_VERSION;
+               if (ioctl(alphaPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+                   Error ("alphaMouseProc ioctl WSMOUSEIO_SETVERSION");
+                   return !Success;
+               }
+           }
+#endif
+
+#if 0
 	    alphaPtrPriv.bmask = 0;
 	    AddEnabledDevice (alphaPtrPriv.fd);
 #endif

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.1	Sun Jan 18 05:21:41 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c	Fri Oct  8 17:49:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: decMouse.c,v 1.1 2004/01/18 05:21:41 rtr Exp $	*/
+/*	$NetBSD: decMouse.c,v 1.2 2010/10/08 17:49:25 tsutsui Exp $	*/
 
 /* XConsortium: sunMouse.c,v 5.21 94/04/17 20:29:47 kaleb Exp */
 /*-
@@ -131,6 +131,19 @@
 		Error ("decMouseProc ioctl VUIDSFORMAT");
 		return !Success;
 	    }
+#endif
+
+#ifdef WSMOUSEIO_SETVERSION
+	   {
+               int version = WSMOUSE_EVENT_VERSION;
+               if (ioctl(decPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+                   Error ("decMouseProc ioctl WSMOUSEIO_SETVERSION");
+                   return !Success;
+               }
+           }
+#endif
+
+#if 0
 	    decPtrPriv.bmask = 0;
 #endif
 	    AddEnabledDevice (decPtrPriv.fd);

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c:1.1	Sat Feb  7 02:39:07 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c	Fri Oct  8 17:49:25 2010
@@ -131,6 +131,16 @@
 	    break;
 
 	case DEVICE_ON:
+#ifdef WSMOUSEIO_SETVERSION
+	   {
+               int version = WSMOUSE_EVENT_VERSION;
+               if (ioctl(dreamcastPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+                   Error ("dreamcastMouseProc ioctl WSMOUSEIO_SETVERSION");
+                   return !Success;
+               }
+           }
+#endif
+
 	    dreamcastPtrPriv.bmask = 0;
 
 	    AddEnabledDevice (dreamcastPtrPriv.fd);

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.1	Thu Dec 29 15:43:40 2005
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c	Fri Oct  8 17:49:25 2010
@@ -120,6 +120,16 @@
 		break;
 
 	case DEVICE_ON:
+#ifdef WSMOUSEIO_SETVERSION
+	   {
+               int version = WSMOUSE_EVENT_VERSION;
+               if (ioctl(ews4800mipsPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+                   Error ("ews4800mipsMouseProc ioctl WSMOUSEIO_SETVERSION");
+                   return !Success;
+               }
+           }
+#endif
+
 		ews4800mipsPtrPriv.bmask = 0;
 
 		AddEnabledDevice(ews4800mipsPtrPriv.fd);

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcMouse.c:1.1.1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcMouse.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcMouse.c:1.1.1.1	Sat Dec 27 05:41:22 2003
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcMouse.c	Fri Oct  8 17:49:26 2010
@@ -156,6 +156,17 @@
 		return !Success;
 	    }
 #endif
+
+#ifdef WSMOUSEIO_SETVERSION
+	   {
+               int version = WSMOUSE_EVENT_VERSION;
+               if (ioctl(macppcPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+                   Error ("macppcMouseProc ioctl WSMOUSEIO_SETVERSION");
+                   return !Success;
+               }
+           }
+#endif
+
 	    macppcPtrPriv.bmask = 0;
 	    AddEnabledDevice (macppcPtrPriv.fd);
 	    pMouse->on = TRUE;

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c:1.1	Sun Aug  1 18:46:49 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c	Fri Oct  8 17:49:26 2010
@@ -123,6 +123,16 @@
 		break;
 
 	case DEVICE_ON:
+#ifdef WSMOUSEIO_SETVERSION
+	   {
+               int version = WSMOUSE_EVENT_VERSION;
+               if (ioctl(newsmipsPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+                   Error ("newsmipsMouseProc ioctl WSMOUSEIO_SETVERSION");
+                   return !Success;
+               }
+           }
+#endif
+
 		newsmipsPtrPriv.bmask = 0;
 
 		AddEnabledDevice(newsmipsPtrPriv.fd);

Reply via email to