Module Name:    xsrc
Committed By:   jun
Date:           Wed Aug 26 12:54:11 UTC 2009

Modified Files:
        xsrc/xfree/xc/programs/Xserver/hw/netbsd/hpc: hpcMouse.c

Log Message:
Fix #41619,current-Xhpc crash with wsmouse.
set WSMOUSEIO_SETVERSION if needed.

tested on NetBSD/hpcmips current.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
    xsrc/xfree/xc/programs/Xserver/hw/netbsd/hpc/hpcMouse.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/hpc/hpcMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/hpc/hpcMouse.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/hpc/hpcMouse.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/hpc/hpcMouse.c:1.1	Sat Jan  3 01:09:19 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/hpc/hpcMouse.c	Wed Aug 26 12:54:10 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: hpcMouse.c,v 1.1 2004/01/03 01:09:19 takemura Exp $	*/
+/* $NetBSD: hpcMouse.c,v 1.2 2009/08/26 12:54:10 jun Exp $	*/
 /* $XConsortium: sunMouse.c,v 5.21 94/04/17 20:29:47 kaleb Exp $ */
 /*-
  * Copyright (c) 1987 by the Regents of the University of California
@@ -149,6 +149,16 @@
 		    hpcPtrPriv.bedev->bedev = &hpcPtrPriv;
 	    }
 
+#ifdef WSMOUSEIO_SETVERSION
+	   {
+               int version = WSMOUSE_EVENT_VERSION;
+               if (ioctl(hpcPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+                   hpcError ("hpcMouseProc ioctl WSMOUSEIO_SETVERSION");
+                   return !Success;
+               }
+           }
+#endif
+
 	    hpcPtrPriv.bemask = 0;
 	    hpcPtrPriv.brmask = 0;
 	    hpcPtrPriv.ebdown = 0;

Reply via email to