[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-mouse: Changes to 'upstream-experimental'



 .gitignore        |   70 +++
 COPYING           |   50 +-
 Makefile.am       |   16 
 README            |  340 +++++++---------
 README.sgml       | 1125 ------------------------------------------------------
 configure.ac      |   66 +--
 man/.cvsignore    |    2 
 man/Makefile.am   |   65 +--
 man/mousedrv.man  |    3 
 src/.cvsignore    |    6 
 src/Makefile.am   |    2 
 src/hurd_mouse.c  |    4 
 src/lnx_mouse.c   |    1 
 src/mouse.c       |  227 ++--------
 src/mouse.h       |    3 
 src/pnp.c         |    3 
 src/sco_mouse.c   |  258 ------------
 src/sun_mouse.c   |  235 +++++++----
 src/xf86OSmouse.h |    3 
 19 files changed, 523 insertions(+), 1956 deletions(-)

New commits:
commit 6d6c24768b2b347436a6d35c4aaa129227c7392e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Sep 8 23:11:19 2010 -0700

    xf86-input-mouse 1.6.0
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 48ab33c..8c99ac5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-mouse],
-        [1.5.0],
+        [1.6.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-mouse])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 4719334800b7eb88479acdcbbc176019ba9c5bd2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Sep 8 22:58:30 2010 -0700

    Bring README a little closer to the current state of reality
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/README b/README
index 984814f..8daf558 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
-  Mouse Support in X11R7.5
-  Kazutaka Yokota
-  17 December 2002
+  Mouse Support in xf86-input-mouse
+  Original version written by Kazutaka Yokota for XFree86 on 17 December 2002
+  Updated by Alan Coopersmith for X.Org releases
   ____________________________________________________________
 
   Table of Contents
@@ -56,8 +56,10 @@
   1.  Introduction
 
 
-  This document describes mouse support in X.Org Foundation's X11R7.5
-  server.
+  This document describes mouse support in the xf86-input-mouse driver
+  for the Xorg X server.   This driver is mainly used on non-Linux
+  operating systems such as BSD & Solaris, as modern Linux systems use
+  the xf86-input-evdev driver instead.
 
   Mouse configuration has often been mysterious task for novice users.
   However, once you learn several basics, it is straightforward to write
@@ -67,13 +69,13 @@
   2.  Supported Hardware
 
 
-  The X.Org Foundation X server supports four classes of mice: serial,
+  The xf86-input-mouse driver supports four classes of mice: serial,
   bus and PS/2 mice, and additional mouse types supported by specific
   operating systems, such as USB mice.
 
 
      Serial mouse
-        The serial mouse has been the most popular pointing device for
+        The serial mouse was once the most popular pointing device for
         PCs.  There have been numerous serial mouse models from a number
         of manufactures.  Despite the wide range of variations, there
         have been relatively few protocols (data format) with which the
@@ -92,14 +94,15 @@
         integrated I/O cards may also have a bus mouse connector.  Some
         bus mice are known as `InPort mouse'.
 
-        Note that some mouse manufactures have sold a package including
+        Note that some mouse manufacturers have sold a package including
         a serial mouse and a serial interface card.  Don't confuse this
         type of products with the genuine bus mouse.
 
 
      PS/2 mouse
-        They are sometimes called `Mouse-port mouse'.  The PS/2 mouse is
-        becoming increasingly common and popular.
+        They are sometimes called `Mouse-port mouse'.  The PS/2 mouse was
+        common for a generation after serial mice, and most laptops still
+        use the PS/2 protocol for built-in pointer devices.
 
         The PS/2 mouse is an intelligent device and may have more than
         three buttons and a wheel or a roller.  The PS/2 mouse is
@@ -115,17 +118,16 @@
         computers. Several devices can be plugged into this bus,
         including mice and keyboards.
 
-        The server includes support for USB mice on some systems.
+        This driver includes support for USB mice on some systems.
 
   Many mice nowadays can be used both as a serial mouse and as a PS/2
-  mouse.  They has a logic to distinguish which interface it is
-  connected to.  However, the mouse which is not marketed as compatible
-  with both serial and PS/2 mouse interface lacks this logic and cannot
-  be used in such a way, even if you can find an appropriate adapter
-  with which you can connect the PS/2 mouse to a serial port or visa
-  versa.
-
-  X11R7.5 supports the mouse with a wheel, a roller or a knob.  Its
+  mouse, or as both a PS/2 and a USB mouse.  They have logic to distinguish
+  which interface it is connected to.  However, a mouse which is not
+  marketed as compatible with both mouse interfaces lacks this logic and
+  cannot be used in such a way, even if you can find an appropriate adapter
+  with which you can connect the mouse to a different format port.
+
+  This driver supports a mouse with a wheel, a roller or a knob.  Its
   action is detected as the Z (third) axis motion of the mouse.  As the
   X server or clients normally do not use the Z axis movement of the
   pointing device, a configuration option, "ZAxisMapping", is provided
@@ -155,7 +157,6 @@
   NetBSD            Ok        Ok        Ok        SP*1      SP*1       SP*1
   NetBSD/pc98       Ok        ?         Ok        NA        NA         NA
   OpenBSD           Ok        Ok        Ok        Ok*1      Ok*1       Ok*1
-  OS/2              SP*2      SP*2      SP*2      SP*2      SP*2       ?
   SCO               Ok        ?         SP*1      SP*1      NA         ?
   Solaris 2.x       Ok        NA*1      ?*1       Ok        Ok         SP*1
   SVR4              Ok        NA*1      SP*1      SP*1      NA         ?
@@ -165,8 +166,6 @@
   SP: support is available in a different form
 
   *1 Refer to the following sections for details.
-  *2 X11R7.5/OS2 will support any type of mouse that the OS supports,
-     whether it is serial, bus mouse, or PnP type.
 
 
 
@@ -303,7 +302,7 @@
 
   3.14.  Solaris
 
-  Testing has been done with Solaris 2.5.1, 2.6, 7, 8, 9 and 10.
+  Testing has been done with Solaris 2.5.1, 2.6, 7, 8, 9, 10, and 11.
 
   On Solaris 10 1/06 and later versions with "virtual mouse" support,
   all PS/2 and USB mice connected to the system can be accessed via the
@@ -320,9 +319,9 @@
   mice correctly.
 
   Additional USB mice can be connected using the "VUID" protocol type
-  and the appropriate "/dev/usb/hid" device with the Option
-  "StreamsModule" "usbms" line included in the associated "InputDevice"
-  section.
+  and the appropriate "/dev/usb/hid" device with the
+       Option "StreamsModule" "usbms"
+  line included in the associated "InputDevice" section.
 
 
 
@@ -346,7 +345,7 @@
   4.  Configuring Your Mouse
 
 
-  Before using the xorgconfig program to set up mouse configuration, you
+  Before editing the xorg.conf file to set up mouse configuration, you
   must identify the interface type, the device name and the protocol
   type of your mouse.  Blindly trying every possible combination of
   mouse settings will lead you nowhere.

commit cb11e9ca60e8ca2590c77f844bfd19e5278f518f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Aug 11 21:30:40 2010 -0700

    MouseCtrl doesn't need to save values we never use
    
    Makes it into a no-op, like evdev's PtrCtrl function, now that
    mouse acceleration is completely handled in dix.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Patrick E. Kane <pekane52 at gmail.com>
    Reviewed-by: Simon Thum <simon.thum@gmx.de>

diff --git a/src/mouse.c b/src/mouse.c
index 99d1f2b..a296021 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1546,26 +1546,14 @@ post_event:
 
 /*
  * MouseCtrl --
- *      Alter the control parameters for the mouse. Note that all special
- *      protocol values are handled by dix.
+ *      Alter the control parameters for the mouse. Note that all
+ *      settings are now handled by dix.
  */
 
 static void
 MouseCtrl(DeviceIntPtr device, PtrCtrl *ctrl)
 {
-    InputInfoPtr pInfo;
-    MouseDevPtr pMse;
-
-    pInfo = device->public.devicePrivate;
-    pMse = pInfo->private;
-
-#ifdef EXTMOUSEDEBUG
-    ErrorF("MouseCtrl pMse=%p\n", pMse);
-#endif
-    
-    pMse->num       = ctrl->num;
-    pMse->den       = ctrl->den;
-    pMse->threshold = ctrl->threshold;
+    /* This function intentionally left blank */
 }
 
 /*
diff --git a/src/xf86OSmouse.h b/src/xf86OSmouse.h
index 09b8525..33b2232 100644
--- a/src/xf86OSmouse.h
+++ b/src/xf86OSmouse.h
@@ -214,9 +214,6 @@ typedef struct _MouseDevRec {
     int			oldBaudRate;
     int			sampleRate;
     int			lastButtons;
-    int			threshold;	/* acceleration */
-    int			num;
-    int			den;
     int			buttons;	/* # of buttons */
     int			emulateState;	/* automata state for 2 button mode */
     Bool		emulate3Buttons;

commit 374725ef73ca929f8a951061528d11ee796cb069
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Aug 11 20:21:33 2010 -0700

    Sun's copyrights belong to Oracle now
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/COPYING b/COPYING
index 8a618a6..844bdb1 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,5 @@
-Copyright 2004-2005, 2008-2010 Sun Microsystems, Inc.  All rights reserved.
+Copyright (c) 2004-2005, 2008-2010, Oracle and/or its affiliates.
+All rights reserved.
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),
diff --git a/man/Makefile.am b/man/Makefile.am
index c3b2b90..419175e 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -19,7 +19,7 @@
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
-# 
+#
 
 drivermandir = $(DRIVER_MAN_DIR)
 
diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index ada445d..42ab933 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2004-2005, 2008-2010 Sun Microsystems, Inc.
+ * Copyright (c) 2004-2005, 2008-2010, Oracle and/or its affiliates.
  * All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a

commit 5b208a2b8d1032489a02c465830150422d1123cc
Author: Henry Zhao <henry.zhao@oracle.com>
Date:   Wed Aug 11 20:16:44 2010 -0700

    Check for NULL currentMode in vuidMouseSendScreenSize()
    
    Fixes Sun bug 6920647:
      Core dump in resume when monitor changed in suspend
      http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6920647
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index ddcdd90..ada445d 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -469,6 +469,9 @@ static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse)
     ScrnInfoPtr pScr = XF86SCRNINFO(pScreen);
     int result;
 
+    if (!pScr->currentMode)
+	return;
+
     if ((pVuidMse->absres.width != pScr->currentMode->HDisplay) || 
 	(pVuidMse->absres.height != pScr->currentMode->VDisplay))
     {

commit b9d6d0309abdec7b384cb1f0958b9bcd60364e60
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Jul 28 21:23:25 2010 +0200

    Do not return the address of a local buffer
    
    Make the const buffer returned by FindDevice a static const buffer, to avoid
    letting be on the stack.
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index 222c8ad..4dac225 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -171,7 +171,7 @@ OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
 static const char *
 FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
 {
-    const char path[] = DEFAULT_MOUSE_DEV;
+    static const char path[] = DEFAULT_MOUSE_DEV;
     int fd;
 
     SYSCALL (fd = open(path, O_RDWR | O_NONBLOCK | O_EXCL));

commit 75300d6ae5a5b2324224423c9f976cba50e47547
Author: Patrick E. Kane <pekane52@gmail.com>
Date:   Fri Jul 16 11:13:20 2010 -0500

    xf86-input-mouse: Update sun_mouse devPrivates code #29049
    
    Update the sun_mouse devPrivates code to conform to the new API
    (introducted by commit faeebead7bfcc78535757ca7acc1faf7554c03b7)
    that requires the PrivateKey to be registered.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=29049
    
    Signed-off-by: Patrick E. Kane <pekane52@gmail.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    Signed-off-by: Jamey Sharp <jamey@minilop.net>

diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index f6e8dbb..ddcdd90 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -116,7 +116,13 @@ static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse);
 static void vuidMouseAdjustFrame(int index, int x, int y, int flags);
 
 static int vuidMouseGeneration = 0;
+
+#if HAS_DEVPRIVATEKEYREC
+static DevPrivateKeyRec vuidMouseScreenIndex;
+#else
 static int vuidMouseScreenIndex;
+#endif /* HAS_DEVPRIVATEKEYREC */
+
 #define vuidMouseGetScreenPrivate(s) ( \
     dixLookupPrivate(&(s)->devPrivates, &vuidMouseScreenIndex))
 #define vuidMouseSetScreenPrivate(s,p) \
@@ -542,6 +548,12 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
 
     case DEVICE_INIT:
 #ifdef HAVE_ABSOLUTE_MOUSE_SCALING
+
+#if HAS_DEVPRIVATEKEYREC
+	if (!dixRegisterPrivateKey(&vuidMouseScreenIndex, PRIVATE_SCREEN, 0))
+		return BadAlloc;
+#endif  /* HAS_DEVPRIVATEKEYREC */
+
 	if (vuidMouseGeneration != serverGeneration) {
 		for (i = 0; i < screenInfo.numScreens; i++) {
 		    ScreenPtr pScreen = screenInfo.screens[i];

commit 112caa1724e139caeb91c792c394b21d1391b370
Author: Fernando Carrijo <fcarrijo@yahoo.com.br>
Date:   Thu Jul 1 07:13:05 2010 -0300

    Purge macro NEED_EVENTS
    
    Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
    Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index 9f87e79..222c8ad 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -21,7 +21,6 @@
  *
  */
 
-#define NEED_EVENTS
 #ifdef HAVE_XORG_CONFIG_H
 #include <xorg-config.h>
 #endif
diff --git a/src/mouse.c b/src/mouse.c
index c95be76..99d1f2b 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -52,7 +52,6 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#define NEED_EVENTS
 #include <X11/X.h>
 #include <X11/Xproto.h>
 
diff --git a/src/pnp.c b/src/pnp.c
index 6b6a68e..50d6b13 100644
--- a/src/pnp.c
+++ b/src/pnp.c
@@ -28,7 +28,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
-#define NEED_EVENTS
 #include <X11/X.h>
 #include <X11/Xproto.h>
 #include "inputstr.h"

commit b714882b0245a2d6078d8778156e88813761f2c4
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu May 27 18:57:33 2010 -0400

    config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS
    
    The existing statement can now be removed from the configuration file.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index a315549..48ab33c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,9 +45,6 @@ XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 XORG_WITH_LINT
 
-# Checks for programs.
-AC_PROG_INSTALL
-
 # Obtain compiler/linker options from server and required extensions
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] xproto inputproto)
 

commit 1188152feee345b7a0f39513cd9d7b8bab938338
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu May 27 09:32:59 2010 -0400

    config: upgrade to util-macros 1.8 for additional man page support
    
    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
    The value of MAN_SUBST is the same for all X.Org packages.
    
    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
    The existing statement can now be removed from the configuration file.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index 0cbac9d..a315549 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,14 +40,13 @@ AC_PROG_LIBTOOL
 
 # Initialize X.Org macros
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.4)
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 XORG_WITH_LINT
 
 # Checks for programs.
 AC_PROG_INSTALL
-AC_PROG_SED
 
 # Obtain compiler/linker options from server and required extensions
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] xproto inputproto)
diff --git a/man/Makefile.am b/man/Makefile.am
index a2514d8..c3b2b90 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -31,22 +31,6 @@ EXTRA_DIST = mousedrv.man
 
 CLEANFILES = $(driverman_DATA)
 
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-	-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-	-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-	-e 's|__xservername__|Xorg|g' \
-	-e 's|__xconfigfile__|xorg.conf|g' \
-	-e 's|__projectroot__|$(prefix)|g' \
-	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-	-e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
-	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
 
 .man.$(DRIVER_MAN_SUFFIX):

commit ad78ef7a9488f7235032e106839224fc43f20e5f
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu May 13 16:09:03 2010 -0400

    config: let AC_PROG_SED find the best value for $SED
    
    Reviewed-by: Rémi Cardona <remi@gentoo.org>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/man/Makefile.am b/man/Makefile.am
index 0d56ef3..a2514d8 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -31,8 +31,6 @@ EXTRA_DIST = mousedrv.man
 
 CLEANFILES = $(driverman_DATA)
 
-SED = sed
-
 # Strings to replace in man pages
 XORGRELSTRING = @PACKAGE_STRING@
   XORGMANNAME = X Version 11

commit 9a9344e66d2e03ee44bf6fe6a1c1d97082a74c20
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu May 13 15:59:24 2010 -0400

    README: keep the text version of README, discard the sgml version
    
    The linuxdoc doc tool is deprecated.
    README files are exclusively text files.
    The file had not been updated for 5 years.
    
    Reviewed-by: Rémi Cardona <remi@gentoo.org>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/Makefile.am b/Makefile.am
index 381a0f4..f73a7ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,13 +21,6 @@
 SUBDIRS = src man
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
-if BUILD_LINUXDOC
-README: README.sgml
-	$(MAKE_TEXT) README.sgml && mv README.txt README
-endif
-
-EXTRA_DIST = README.sgml
-
 .PHONY: ChangeLog INSTALL
 
 INSTALL:
diff --git a/README.sgml b/README.sgml
deleted file mode 100644
index 6dbe8f7..0000000
--- a/README.sgml
+++ /dev/null
@@ -1,1122 +0,0 @@
-<!DOCTYPE linuxdoc PUBLIC "-//Xorg//DTD linuxdoc//EN" [
-<!ENTITY % defs SYSTEM "X11/defs.ent"> %defs;
-]>
-
-<article>
-<title>Mouse Support in X11R&relvers;
-<author>Kazutaka Yokota
-<date>17 December 2002
-
-<toc>
- 
-<sect>Introduction <p>
-
-This document describes mouse support in X.Org Foundation's X11R&relvers; server.
-
-Mouse configuration has often been mysterious task for
-novice users.
-However, once you learn several basics, it is straightforward
-to write the mouse <tt>"InputDevice"</tt>
-section in the <tt>xorg.conf</tt> file by hand.
-
-<sect>Supported Hardware <p>
-
-The X.Org Foundation X server supports four classes of mice:
-serial, bus and PS/2 mice, and additional mouse types supported by
-specific operating systems, such as USB mice.
-
-<descrip>
-<tag>Serial mouse</tag>
-The serial mouse has been the most popular pointing device for
-PCs.
-There have been numerous serial mouse models from a number of
-manufactures.
-Despite the wide range of variations, there have been relatively
-few protocols (data format) with which the serial mouse talks
-to the host computer.
-
-The modern serial mouse conforms to the PnP COM device specification
-so that the host computer can automatically detect the mouse
-and load an appropriate driver.
-The X server supports this specification and can detect
-popular PnP serial mouse models on most platforms.
-
-<tag>Bus mouse</tag>
-The bus mouse connects to a dedicated interface card in an expansion
-slot.
-Some video cards, notably those from ATI, and integrated I/O
-cards may also have a bus mouse connector.
-Some bus mice are known as `InPort mouse'.
-
-Note that some mouse manufactures have sold a package including a serial mouse
-and a serial interface card.  
-Don't confuse this type of products with the genuine bus mouse.
-
-<tag>PS/2 mouse</tag>
-They are sometimes called `Mouse-port mouse'.
-The PS/2 mouse is becoming increasingly common and popular.
-
-The PS/2 mouse is an intelligent device and may have more than
-three buttons and a wheel or a roller.
-The PS/2 mouse is usually compatible with the original PS/2 mouse from IBM
-immediately after power up.
-The PS/2 mouse with additional features requires a specialized
-initialization procedure to enable these features.
-Without proper initialization, it behaves as though it were an ordinary
-two or three button mouse.
-
-<tag>USB mouse </tag>
-USB (Universal Serial Bus) ports are present on most modern
-computers. Several devices can be plugged into this bus, including
-mice and keyboards. 
-
-The server includes support for USB mice on some systems.
-</descrip>
-
-Many mice nowadays can be used both as a serial mouse and as a PS/2 mouse.
-They has a logic to distinguish which interface it is connected to.
-However, the mouse which is not marketed as compatible with both
-serial and PS/2 mouse interface lacks this logic and cannot be
-used in such a way, even if you can find an appropriate
-adapter with which you can connect the PS/2 mouse to a serial port
-or visa versa.
-
-X11R&relvers; supports the mouse with a wheel, a roller or a knob.
-Its action is detected as the Z (third) axis motion of the mouse.
-As the X server or clients normally do not use the Z axis movement of the 
-pointing device, a configuration option, <tt>"ZAxisMapping"</tt>,
-is provided to assign the Z axis movement to another axis or a pair
-of buttons (see below).
-
-<sect>OS Support for Mice <p>
-
-<sect1>Summary of Supported Mouse Protocol Types <p>
-<verb>
-                                Protocol Types
-                serial     PnP     BusMouse    PS/2   Extended PS/2
-OS platforms   protocols  serial   protocol  protocol  protocols
-                          "Auto"  "BusMouse"  "PS/2"   "xxxPS/2"    USB
--------------------------------------------------------------------------
-BSD/OS            Ok        ?         ?         ?         ?          ?
-FreeBSD           Ok        Ok        Ok        Ok        SP*1       SP*1
-FreeBSD(98)       Ok        ?         Ok        NA        NA         ?
-Interactive Unix  Ok        NA        ?*1       ?*1       NA         ?
-Linux             Ok        Ok        Ok        Ok        Ok         ?
-Linux/98          Ok        ?         Ok        NA        NA         ?
-LynxOS            Ok        NA        Ok        Ok        NA         ?
-NetBSD            Ok        Ok        Ok        SP*1      SP*1       SP*1
-NetBSD/pc98       Ok        ?         Ok        NA        NA         NA
-OpenBSD           Ok        Ok        Ok        Ok*1      Ok*1       Ok*1
-OS/2              SP*2      SP*2      SP*2      SP*2      SP*2       ?
-SCO               Ok        ?         SP*1      SP*1      NA         ?
-Solaris 2.x       Ok        NA*1      ?*1       Ok        Ok         SP*1
-SVR4              Ok        NA*1      SP*1      SP*1      NA         ?
-PANIX             Ok        ?         SP*1      SP*1      NA         ?
-
-Ok: support is available,  NA: not available, ?: untested or unknown.
-SP: support is available in a different form
-
-*1 Refer to the following sections for details.
-*2 X11R&relvers;/OS2 will support any type of mouse that the OS supports, 
-   whether it is serial, bus mouse, or PnP type. 
-
-</verb>
-
-<sect1>BSD/OS <p>
-No testing has been done with BSD/OS.
-
-<sect1>FreeBSD <p>
-FreeBSD supports the <tt>"SysMouse"</tt> protocol which must be 
-specified when the <tt>moused</tt> daemon is running in versions 2.2.1 
-or later.
-
-When running the <tt>moused</tt>daemon, you must always specify the
-<tt>/dev/sysmouse</tt> device and the <tt>"SysMouse"</tt> protocol
-to the X server, regardless of the actual type of your mouse.
-
-FreeBSD versions 2.2.6 or later include the kernel-level
-support for extended PS/2 mouse protocols and there is no need to specify
-the exact protocol name to the X server.
-Instead specify the <tt>"PS/2"</tt> or <tt>"Auto"</tt> protocol and 
-the X server will automatically make use of the kernel-level support.
-
-In fact, <tt>"Auto"</tt> protocol support is really efficient in these 
-versions.
-You may always specify <tt>"Auto"</tt> to any mouse, serial, 
-bus or PS/2, unless the mouse is an old serial model which doesn't
-support PnP.
-
-FreeBSD versions 2.2.5 or earlier do not support extended PS/2 
-mouse protocols (<tt>"xxxPS/2"</tt>).
-Always specify the <tt>"PS/2"</tt> protocol for any PS/2 mouse 
-in these versions regardless of the brand of the mouse.
-
-FreeBSD versions 3.1 or later have support for USB mice.
-Specify the <tt>"Auto"</tt> protocol for the <tt>/dev/ums0</tt> device.
-(If the <tt>moused</tt> daemon is running for the USB mouse, 
-you must use <tt>/dev/sysmouse</tt> instead of <tt>/dev/ums0</tt>
-as explained above.) See the <em>ums(4)</em> manual page for details. 
-
-<sect1>FreeBSD(98) <p>
-The PS/2 mouse is not supported.
-
-<sect1>Interactive Unix <p>
-The PnP serial mouse support (the <tt>"Auto"</tt> protocol) is not
-supported for the moment.
-
-The bus mouse and PS/2 mouse should be supported by using the 
-appropriate device drivers. 
-Use <tt>/dev/mouse</tt> for the <tt>"BusMouse"</tt> protocol
-and <tt>/dev/kdmouse</tt> for the <tt>"PS/2"</tt> protocol. 
-These protocols are untested but may work. 
-Please send success/failure reports to
-<url url="mailto:michael.rohleder@stadt-frankfurt.de";>
-
-<sect1>Linux <p>
-All protocol types should work.
-
-<sect1>Linux/98 <p>
-The PS/2 mouse is not supported.
-
-<sect1>LynxOS <p>
-The PnP serial mouse support (the <tt>"Auto"</tt> protocol) is disabled in
-LynxOS, because of limited TTY device driver functionality.
-
-<sect1>NetBSD <p>
-NetBSD 1.3.x and former does not support extended PS/2 mouse protocols
-(<tt>"xxxPS/2"</tt>). 
-The PS/2 mouse device driver <tt>/dev/pms</tt> emulates the bus mouse.
-Therefore, you should always specify the <tt>"BusMouse"</tt> protocol for 
-any PS/2 mouse regardless of the brand of the mouse.
-<p>
-The <tt>"wsmouse"</tt> protocol introduced in NetBSD
-1.4 along with the wscons console driver is supported. You need to run binaries
-compiled on NetBSD 1.4 to have support 
-for it though. Use <tt>"/dev/wsmouse0"</tt> for the device. Refer to the 
-<em>wsmouse(4)</em> manual page for kernel configuration informations.
-<p>
-This driver also provides support for USB mice. See the
-<em>ums(4)</em> manual page for details. 
-
-<sect1>NetBSD/pc98 <p>
-The PS/2 mouse is not supported.
-
-<sect1>OpenBSD <p>
-The raw PS/2 mouse device driver <tt>/dev/psm0</tt> uses the raw PS/2
-mouse protocol.
-
-OpenBSD 2.2 and earlier does not support extended PS/2 mouse protocols
-(<tt>"xxxPS/2"</tt>) .  Therefore, you should specify the
-<tt>"PS/2"</tt> protocol for any PS/2 mouse regardless of the brand of
-the mouse.
-
-OpenBSD 2.3 and later support all extended PS/2 mouse protocols. 
-You can select the <tt>"Auto"</tt> protocol for PnP PS/2
-mice or any specific extended (<tt>"xxxPS/2"</tt>) protocol
-for non PnP mice.
-
-There is also a cooked PS/2 mouse device driver <tt>/dev/pms0</tt>
-which emulates the bus mouse.  Specify the <tt>"BusMouse"</tt>
-protocol for any PS/2 mouse regardless of the brand of the mouse when
-using this device.
-<p>
-XFree86 3.3.6 support USB mice on OpenBSD 2.6 and later though the
-generic Human Interface Device (hid) <tt>/dev/uhid*</tt>. Select the
-<tt>"usb"</tt> protocol and the <tt>/dev/uhid*</tt> instance
-corresponding to your mouse as the device name.
-
-<sect1>OS/2 <p>
-X11R&relvers;/OS2 always uses the native mouse driver of the operating system
-and will support any type of pointer that the OS supports, whether it is
-serial, bus mouse, or PnP type.
-If the mouse works under Presentation Manager, 
-it will also work under X11R&relvers;/OS2.
-
-Always specify <tt>"OSMouse"</tt> as the protocol type.
-
-<sect1>SCO <p>
-The bus and PS/2 mouse are supported with the <tt>"OSMouse"</tt> 
-protocol type.
-
-The <tt>"OSMouse"</tt> may also be used with the serial mouse.
-
-<sect1>Solaris <p>
-Testing has been done with Solaris 2.5.1, 2.6, 7, 8, 9 and 10.
-
-On Solaris 10 1/06 and later versions with "virtual mouse" support,
-all PS/2 and USB mice connected to the system can be accessed via 
-the /dev/mouse device using the VUID protocol, including USB mice 
-plugged in after the X server is started.   On older releases or
-to address mice individually, specific devices and protocols may 
-be used.
-
-Logitech and Microsoft bus mice
-have not been tested, but might work with the <tt>/dev/logi</tt> and
-<tt>/dev/msm</tt> devices.
-Standard 2 and 3 button PS/2 mice work with the <tt>"PS/2"</tt> protocol
-type and the <tt>/dev/kdmouse</tt> device.
-USB mice work with the <tt>"VUID"</tt> protocol type and the 
-<tt>/dev/mouse</tt> device.
-The PnP serial mouse support via the <tt>"Auto"</tt> protocol has been tested
-and does not work.  The <tt>"Auto"</tt> protocol can however detect PS/2 and
-USB mice correctly.
-
-Additional USB mice can be connected using the <tt>"VUID"</tt> protocol type
-and the appropriate <tt>"/dev/usb/hid"</tt> device with the <tt>Option "StreamsModule" "usbms"</tt> line included in the associated <tt>"InputDevice"</tt>
-section.
-
-<sect1>SVR4 <p>
-The bus and PS/2 mouse may be supported with the <tt>"Xqueue"</tt> 
-protocol type.
-
-The <tt>"Xqueue"</tt> may also be used with the serial mouse.
-
-The PnP serial mouse support (the <tt>"Auto"</tt> protocol) is not
-tested.
-
-<sect1>PANIX <p>
-The PC/AT version of PANIX supports the bus and PS/2 mouse with the
-<tt>"Xqueue"</tt> protocol type.
-The PC-98 version of PANIX supports the bus mouse with the
-<tt>"Xqueue"</tt> protocol type.
-
-<sect>Configuring Your Mouse <p>
-
-Before using the <tt>xorgconfig</tt> program
-to set up mouse configuration, you must identify the interface type,
-the device name and the protocol type of your mouse.
-Blindly trying every possible combination of mouse settings 
-will lead you nowhere.
-
-The first thing you need to know is the interface type 
-of the mouse you are going to use.
-It can be determined by looking at the connector of the mouse.
-The serial mouse has a D-Sub female 9- or 25-pin connector.
-The bus mice have either a D-Sub male 9-pin connector 
-or a round DIN 9-pin connector.
-The PS/2 mouse is equipped with a small, round DIN 6-pin connector.
-USB mice have a thin rectangular connector.
-Some mice come with adapters with which the connector can 
-be converted to another.  If you are to use such an adapter,
-remember that the connector at the very end of the mouse/adapter pair is 
-what matters.
-
-The next thing to decide is a device node to use for the given interface.
-For the bus and PS/2 mice, there is little choice; 
-your OS most possibly offers just one device node each
-for the bus mouse and PS/2 mouse.
-There may be more than one serial port to which the serial
-mouse can be attached.  
-
-The next step is to guess the appropriate protocol type for the mouse.
-The X server may be able to select a protocol type for the given mouse
-automatically in some cases.
-Otherwise, the user has to choose one manually.
-Follow the guidelines below.
-
-<descrip>
-<tag>Bus mouse</tag>
-The bus and InPort mice always use <tt>"BusMouse"</tt>
-protocol regardless of the brand of the mouse.
-
-Some OSs may allow you to specify <tt>"Auto"</tt> as the 
-protocol type for the bus mouse.
-
-<tag>PS/2 mouse</tag>
-The <tt>"PS/2"</tt> protocol should always be tried first for the PS/2 mouse
-regardless of the brand of the mouse.
-Any PS/2 mouse should work with this protocol type, although
-wheels and other additional features are unavailable in the
-X server.
-
-After verifying the mouse works with this protocol,
-you may choose to specify one of <tt>"xxxPS/2"</tt> protocols so that
-extra features are made available in the X server.
-However, support for these PS/2 mice assumes certain behavior of
-the underlying OS and may not always work as expected.
-Support for some PS/2 mouse models may be disabled all together
-for some OS platforms for this reason.
-
-Some OSs may allow you to specify <tt>"Auto"</tt> as the 
-protocol type for the PS/2 mouse and the X server will automatically
-adjust itself.
-
-<tag>Serial mouse</tag>
-The server supports a wide range of mice, both old and new.
-If your mouse is of a relatively new model, it may conform to the
-PnP COM device specification and the X server may be able to 
-detect an appropriate protocol type for the mouse automatically.
-
-Specify <tt>"Auto"</tt> as the protocol type and start the X server.
-If the mouse is not a PnP mouse, or the X server cannot determine
-a suitable protocol type, the server will print the following
-error message and abort.
-
-<verb>
-<mousename>: cannot determine the mouse protocol
-</verb>
-
-If the X server generates the above error message, you need to 
-manually specify a protocol type for your mouse.
-Choose one from the following list:
-
-<itemize>
-	<item><tt>GlidePoint</tt>
-	<item><tt>IntelliMouse</tt>
-	<item><tt>Logitech</tt>
-	<item><tt>Microsoft</tt>
-	<item><tt>MMHittab</tt>
-	<item><tt>MMSeries</tt>
-	<item><tt>MouseMan</tt>
-	<item><tt>MouseSystems</tt>
-	<item><tt>ThinkingMouse</tt>
-</itemize>
-
-When you choose, keep in mind the following rule of thumb:
-
-<enum>
-<item><tt>"Logitech"</tt> protocol is for old serial mouse models 
-from Logitech.
-Modern Logitech mice use either <tt>"MouseMan"</tt> or <tt>"Microsoft"</tt>
-protocol.
-<item>Most 2-button serial mice support the <tt>"Microsoft"</tt> protocol.
-<item>3-button serial mice may work with the <tt>"Mousesystems"</tt>
-protocol. If it doesn't, it may work instead with the 
-<tt>"Microsoft"</tt> protocol although the third (middle) button won't 
-function.
-3-button serial mice may also work with the <tt>"Mouseman"</tt>
-protocol under which the third button may function as expected.
-<item>3-button serial mice may have a small switch at the bottom 
-of the mouse to choose between ``MS'' and ``PC'', or ``2'' and ``3''.
-``MS'' or ``2'' usually mean the <tt>"Microsoft"</tt> protocol.
-``PC'' or ``3'' will choose the <tt>"MouseSystems"</tt> protocol.
-<item>If the serial mouse has a roller or a wheel, it may be compatible 
-with the <tt>"IntelliMouse"</tt> protocol.
-<item>If the serial mouse has a roller or a wheel and it doesn't work
-with the <tt>"IntelliMouse"</tt> protocol, you have to use it 
-as a regular 2- or 3-button serial mouse.
-</enum>
-
-If the <tt>"Auto"</tt> protocol is specified and the mouse seems to be working,
-but you find that not all features of the mouse are available, that is
-because the X server does not have native support for that model of mouse


Reply to: