.gitignore                 |    3 
 Makefile.am                |    2 
 README                     |   13 +
 configure.ac               |   33 ++++
 fdi/11-x11-vmmouse.fdi     |   10 +
 fdi/Makefile.am            |   25 +++
 man/Makefile.am            |    4 
 man/vmmouse_detect.1       |   58 +++++++
 shared/Makefile.am         |   29 +++
 shared/vmmouse_client.c    |  339 +++++++++++++++++++++++++++++++++++++++++++++
 shared/vmmouse_client.h    |   73 +++++++++
 shared/vmmouse_defs.h      |   66 ++++++++
 shared/vmmouse_proto.c     |  147 +++++++++++++++++++
 shared/vmmouse_proto.h     |  131 +++++++++++++++++
 src/Makefile.am            |   13 -
 src/vmmouse.c              |   50 +++---
 src/vmmouse_client.c       |  339 ---------------------------------------------
 src/vmmouse_client.h       |   73 ---------
 src/vmmouse_defs.h         |   66 --------
 src/vmmouse_proto.c        |  147 -------------------
 src/vmmouse_proto.h        |  131 -----------------
 src/xf86OSmouse.h          |  277 ++++++++++++++++++++++++++++++++++++
 tools/Makefile.am          |   38 +++++
 tools/hal-probe-vmmouse.in |   30 +++
 tools/vmmouse_detect.c     |   62 ++++++++
 25 files changed, 1364 insertions(+), 795 deletions(-)

New commits:
commit bc324161680b1403e5811b3ac2b9ca679829a5c9
Author: Peter Hutterer <peter.hutte...@who-t.net>
Date:   Mon Dec 22 14:19:30 2008 +1000

    Bump for 12.6.3 release

diff --git a/configure.ac b/configure.ac
index b461820..5c5f639 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-vmmouse],
-        12.6.2,
+        12.6.3,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-vmmouse)
 

commit 6f855ac348db34726eac68dc114563543ff0eae2
Author: Peter Hutterer <peter.hutte...@who-t.net>
Date:   Mon Dec 22 14:53:27 2008 +1000

    Fix make distcheck allowing custom build directories.

diff --git a/src/Makefile.am b/src/Makefile.am
index 844a972..6848537 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,14 +18,12 @@
 #  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.
 
-SHARED_DIR = $(top_srcdir)/shared
-
 @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la
 @driver_n...@_drv_la_ldflags = -module -avoid-version
-...@driver_name@_drv_la_LIBADD = $(SHARED_DIR)/l...@driver_name@.la
+...@driver_name@_drv_la_LIBADD = $(top_builddir)/shared/l...@driver_name@.la
 @driver_n...@_drv_ladir = @inputdir@
 
-INCLUDES = -I$(SHARED_DIR)
+INCLUDES = -I$(top_srcdir)/shared
 
 @driver_n...@_drv_la_sources = @driver_n...@.c xf86OSmouse.h
                                
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 9236c5f..c00d65d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -20,11 +20,10 @@
 
 bin_PROGRAMS = @driver_n...@_detect
 
-SHARED_PATH = $(top_srcdir)/shared
-INCLUDES = -I$(SHARED_PATH)
+INCLUDES = -I$(top_srcdir)/shared
 
 @driver_n...@_detect_sources = vmmouse_detect.c
-...@driver_name@_detect_LDADD = $(SHARED_PATH)/l...@driver_name@.la
+...@driver_name@_detect_LDADD = $(top_builddir)/shared/l...@driver_name@.la
 
 calloutsdir=$(HAL_CALLOUTS_DIR)
 callouts_SCRIPTS = hal-probe-vmmouse
@@ -32,7 +31,7 @@ callouts_SCRIPTS = hal-probe-vmmouse
 hal-probe-vmmouse:
        sed -e 's|__BIN_PREFIX__|$(bindir)|g' \
            -e 's|__HAL_BIN_PREFIX__|$(HAL_BIN_DIR)|g' \
-           < $...@.in > $@
+           < $(srcdir)/$...@.in > $@
 
 EXTRA_DIST = hal-probe-vmmouse.in
 

commit 7cb41b467a161461627e6abf1ea979b7058d02f0
Author: Peter Hutterer <peter.hutte...@who-t.net>
Date:   Mon Dec 22 14:10:38 2008 +1000

    Fix build against master - add xf86OSmouse.h

diff --git a/src/Makefile.am b/src/Makefile.am
index b8ad878..844a972 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,5 +27,5 @@ SHARED_DIR = $(top_srcdir)/shared
 
 INCLUDES = -I$(SHARED_DIR)
 
-...@driver_name@_drv_la_SOURCES = @driver_n...@.c
+...@driver_name@_drv_la_SOURCES = @driver_n...@.c xf86OSmouse.h
                                
diff --git a/src/xf86OSmouse.h b/src/xf86OSmouse.h
new file mode 100644
index 0000000..09b8525
--- /dev/null
+++ b/src/xf86OSmouse.h
@@ -0,0 +1,277 @@
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER 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.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/* Public interface to OS-specific mouse support. */
+
+#ifndef _XF86OSMOUSE_H_
+#define _XF86OSMOUSE_H_
+
+#include "xf86Xinput.h"
+
+/* Mouse interface classes */
+#define MSE_NONE       0x00
+#define MSE_SERIAL     0x01            /* serial port */
+#define MSE_BUS                0x02            /* old bus mouse */
+#define MSE_PS2                0x04            /* standard read-only PS/2 */
+#define MSE_XPS2       0x08            /* extended PS/2 */
+#define MSE_AUTO       0x10            /* auto-detect (PnP) */
+#define MSE_MISC       0x20            /* The OS layer will identify the
+                                        * specific protocol names that are
+                                        * supported for this class. */
+
+/* Mouse Protocol IDs. */
+typedef enum {
+    PROT_UNKNOWN = -2,
+    PROT_UNSUP = -1,           /* protocol is not supported */
+    PROT_MS = 0,
+    PROT_MSC,
+    PROT_MM,
+    PROT_LOGI,
+    PROT_LOGIMAN,
+    PROT_MMHIT,
+    PROT_GLIDE,
+    PROT_IMSERIAL,
+    PROT_THINKING,
+    PROT_ACECAD,
+    PROT_VALUMOUSESCROLL,
+    PROT_PS2,
+    PROT_GENPS2,
+    PROT_IMPS2,
+    PROT_EXPPS2,
+    PROT_THINKPS2,
+    PROT_MMPS2,
+    PROT_GLIDEPS2,
+    PROT_NETPS2,
+    PROT_NETSCPS2,
+    PROT_BM,
+    PROT_AUTO,
+    PROT_SYSMOUSE,
+    PROT_NUMPROTOS     /* This must always be last. */
+} MouseProtocolID;
+
+struct _MouseDevRec;
+
+typedef int (*GetInterfaceTypesProc)(void);
+typedef const char **(*BuiltinNamesProc)(void);
+typedef Bool (*CheckProtocolProc)(const char *protocol);
+typedef Bool (*BuiltinPreInitProc)(InputInfoPtr pInfo, const char *protocol,
+                                  int flags);
+typedef const char *(*DefaultProtocolProc)(void);
+typedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara);
+typedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate,
+                          int res);
+typedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char *protocol,
+                                     int flags);
+typedef const char *(*GuessProtocolProc)(InputInfoPtr pInfo, int flags);
+
+/*
+ * OSMouseInfoRec is used to pass information from the OSMouse layer to the
+ * OS-independent mouse driver.
+ */
+typedef struct {
+       GetInterfaceTypesProc   SupportedInterfaces;
+       BuiltinNamesProc        BuiltinNames;
+       CheckProtocolProc       CheckProtocol;
+       BuiltinPreInitProc      PreInit;
+       DefaultProtocolProc     DefaultProtocol;
+       SetupAutoProc           SetupAuto;
+       SetResProc              SetPS2Res;
+       SetResProc              SetBMRes;
+       SetResProc              SetMiscRes;
+       FindDeviceProc          FindDevice;
+       GuessProtocolProc       GuessProtocol;
+} OSMouseInfoRec, *OSMouseInfoPtr;
+
+/*
+ * SupportedInterfaces: Returns the mouse interface types that the OS support.
+ *             If MSE_MISC is returned, then the BuiltinNames and
+ *             CheckProtocol should be set.
+ *
+ * BuiltinNames: Returns the names of the protocols that are fully handled
+ *             in the OS-specific code.  These are names that don't appear
+ *             directly in the main "mouse" driver.
+ *
+ * CheckProtocol: Checks if the protocol name given is supported by the
+ *             OS.  It should return TRUE for both "builtin" protocols and
+ *             protocols of type MSE_MISC that are supported by the OS.
+ *
+ * PreInit:    The PreInit function for protocols that are builtin.  This
+ *             function is passed the protocol name.
+ *
+ * DefaultProtocol: Returns the name of a default protocol that should be used
+ *             for the OS when none has been supplied in the config file.
+ *             This should only be set when there is a reasonable default.
+ *
+ * SetupAuto:  This function can be used to do OS-specific protocol
+ *             auto-detection.  It returns the name of the detected protocol,
+ *             or NULL when detection fails.  It may also adjust one or more
+ *             of the "protoPara" values for the detected protocol by setting
+ *             then to something other than -1.  SetupAuto gets called in two
+ *             ways.  The first is before any devices have been opened.  This
+ *             can be used when the protocol "Auto" always maps to a single
+ *             protocol type.  The second is with the device open, allowing
+ *             OS-specific probing to be done.
+ *
+ * SetPS2Res:  Set the resolution and sample rate for MSE_PS2 and MSE_XPS2
+ *             protocol types.
+ *
+ * SetBMRes:   Set the resolution and sample rate for MSE_BM protocol types.
+ *
+ * SetMiscRes: Set the resolution and sample rate for MSE_MISC protocol types.
+ *
+ * FindDevice: This function gets called when no Device has been specified
+ *             in the config file.  OS-specific methods may be used to guess
+ *             which input device to use.  This function is called after the
+ *             pre-open attempts at protocol discovery are done, but before
+ *             the device is open.  I.e., after the first SetupAuto() call,
+ *             after the DefaultProtocol() call, but before the PreInit()
+ *             call.  Available protocol information may be used in locating
+ *             the default input device.
+ *
+ * GuessProtocol: A last resort attempt at guessing the mouse protocol by
+ *             whatever OS-specific means might be available.  OS-independent
+ *             things should be in the mouse driver.  This function gets
+ *             called after the mouse driver's OS-independent methods have
+ *             failed.
+ */
+
+extern OSMouseInfoPtr xf86OSMouseInit(int flags);
+
+/* Adjust this when the mouse interface changes. */
+
+/*
+ * History:
+ *
+ *  1.0.0 - Everything up to when versioning was started.
+ *  1.1.0 - FindDevice and GuessProtocol added to OSMouseInfoRec
+ *  1.2.0 - xisbscale added to MouseDevRec
+ *
+ */
+
+/* Z axis mapping */
+#define MSE_NOZMAP     0
+#define MSE_MAPTOX     -1
+#define MSE_MAPTOY     -2
+#define MSE_MAPTOZ     -3
+#define MSE_MAPTOW     -4
+
+/* Generalize for other axes. */
+#define MSE_NOAXISMAP  MSE_NOZMAP
+
+#define MSE_MAXBUTTONS 24
+#define MSE_DFLTBUTTONS         3
+
+/*
+ * Mouse device record.  This is shared by the mouse driver and the OSMouse
+ * layer.
+ */
+
+typedef void (*checkMovementsProc)(InputInfoPtr,int, int);
+typedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool);
+typedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char);
+typedef Bool (*dataGoodProc)(struct _MouseDevRec *);
+
+typedef void (*PostMseEventProc)(InputInfoPtr pInfo, int buttons,
+                             int dx, int dy, int dz, int dw);
+typedef void (*MouseCommonOptProc)(InputInfoPtr pInfo);
+
+typedef struct _MouseDevRec {
+    PtrCtrlProcPtr     Ctrl;
+    PostMseEventProc   PostEvent;
+    MouseCommonOptProc CommonOptions;
+    DeviceIntPtr       device;
+    const char *       mseDevice;
+    const char *       protocol;
+    MouseProtocolID    protocolID;
+    MouseProtocolID    oldProtocolID; /* hack */
+    int                        class;
+    int                        mseModel;
+    int                        baudRate;
+    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;
+    Bool               emulate3ButtonsSoft;
+    int                        emulate3Timeout;/* Timeout for 3 button 
emulation */
+    Bool               chordMiddle;
+    Bool                flipXY;
+    int                 invX;
+    int                 invY;
+    int                        mouseFlags;     /* Flags to Clear after opening
+                                        * mouse dev */
+    int                        truebuttons;    /* (not used)
+                                        * Arg to maintain before
+                                        * emulate3buttons timer callback */
+    int                        resolution;
+    int                        negativeZ;      /* button mask */
+    int                        positiveZ;      /* button mask */
+    int                        negativeW;      /* button mask */
+    int                        positiveW;      /* button mask */
+    pointer            buffer;         /* usually an XISBuffer* */
+    int                        protoBufTail;
+    unsigned char      protoBuf[8];
+    unsigned char      protoPara[8];
+    unsigned char      inSync;         /* driver in sync with datastream */
+    pointer            mousePriv;      /* private area */
+    InputInfoPtr       pInfo;
+    int                        origProtocolID;
+    const char *       origProtocol;
+    Bool               emulate3Pending;/* timer waiting */
+    CARD32             emulate3Expires;/* time to fire emulation code */
+    Bool               emulateWheel;
+    int                        wheelInertia;
+    int                        wheelButton;
+    int                        negativeX;      /* Button values.  Unlike the Z 
and */
+    int                        positiveX;      /* W equivalents, these are 
button  */
+    int                        negativeY;      /* values rather than button 
masks. */
+    int                        positiveY;
+    int                        wheelYDistance;
+    int                        wheelXDistance;
+    Bool               autoProbe;
+    checkMovementsProc  checkMovements;
+    autoProbeProc      autoProbeMouse;
+    collectDataProc    collectData;
+    dataGoodProc       dataGood;
+    int                        angleOffset;
+    pointer            pDragLock;      /* drag lock area */
+    int                        xisbscale;      /* buffer size for 1 event */
+    int                        wheelButtonTimeout;/* Timeout for the wheel 
button emulation */
+    CARD32             wheelButtonExpires;
+    int                        doubleClickSourceButtonMask;
+    int                        doubleClickTargetButton;
+    int                        doubleClickTargetButtonMask;
+    int                        doubleClickOldSourceState;
+    int                        lastMappedButtons;
+    int                        buttonMap[MSE_MAXBUTTONS];
+} MouseDevRec, *MouseDevPtr;
+
+#endif /* _XF86OSMOUSE_H_ */

commit bda45dcf9fbbd42c155c7071d547d0d067429dde
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Fri Nov 14 10:52:26 2008 -0800

    Bump for 12.6.2 release.

diff --git a/configure.ac b/configure.ac
index 2b7b01b..b461820 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-vmmouse],
-        12.6.1,
+        12.6.2,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-vmmouse)
 
diff --git a/src/vmmouse.c b/src/vmmouse.c
index ac50902..a712bd5 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -95,7 +95,7 @@
  */
 #define VMMOUSE_MAJOR_VERSION 12
 #define VMMOUSE_MINOR_VERSION 6
-#define VMMOUSE_PATCHLEVEL 1
+#define VMMOUSE_PATCHLEVEL 2
 #define VMMOUSE_DRIVER_VERSION \
    (VMMOUSE_MAJOR_VERSION * 65536 + VMMOUSE_MINOR_VERSION * 256 + 
VMMOUSE_PATCHLEVEL)
 #define VMMOUSE_DRIVER_VERSION_STRING \

commit b29b45a25b3b2db58f81e727d787c337bbd87637
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Fri Nov 14 10:24:36 2008 -0800

    Revert "Narrow down the scope of what systems are checked for the vmmouse 
device."
    
    This reverts commit 93f032b80b841e1b6beeff814e8d9519e485fdef.
    
    I'm doing this for now because qemu (with and without kvm) provides
    an implementation of the vmmouse device and input hotplug works there
    right now. Later, I'll try and dig up an equivalent id check for them.

diff --git a/fdi/11-x11-vmmouse.fdi b/fdi/11-x11-vmmouse.fdi
index 4455555..e725f9a 100644
--- a/fdi/11-x11-vmmouse.fdi
+++ b/fdi/11-x11-vmmouse.fdi
@@ -3,9 +3,7 @@
   <device>
     <match key="info.capabilities" contains="input.mouse">
       <match key="input.originating_device" contains="i8042_AUX_port">
-        <match 
key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" 
string="VMware, Inc.">
-          <append key="info.callouts.add" 
type="strlist">hal-probe-vmmouse</append>
-        </match>
+        <append key="info.callouts.add" 
type="strlist">hal-probe-vmmouse</append>
       </match>
     </match>
   </device>

commit a5718c9b31d5fb72a88c0e145766efd861e0a3d3
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Thu Nov 13 15:43:31 2008 -0800

    Only turn on absolute mode when we get an actual event; we don't
    want the driver to throw us into absolute mode just because the
    device is present but the user has a relative input path configured.

diff --git a/src/vmmouse.c b/src/vmmouse.c
index 9284c0e..ac50902 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -310,6 +310,9 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
    if (!mPriv) {
       return NULL;
    }
+
+   mPriv->relative = TRUE;
+
    /*
     * try to enable vmmouse here
     */
@@ -843,8 +846,6 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
                  return FALSE;
               } else {
                  mPriv->vmmouseAvailable = TRUE;
-                 VMMouseClient_RequestAbsolute();
-                 mPriv->relative = FALSE;
                  xf86Msg(X_INFO, "VMWARE(0): vmmouse enabled\n");
               }
            }
@@ -865,6 +866,7 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
         if( mPriv->vmmouseAvailable ) {
            VMMouseClient_Disable();
            mPriv->vmmouseAvailable = FALSE;
+            mPriv->relative = TRUE;
         }
 
         xf86RemoveEnabledDevice(pInfo);
@@ -914,6 +916,12 @@ VMMouseReadInput(InputInfoPtr pInfo)
    pMse = pInfo->private;
    mPriv = pMse->mousePriv;
 
+   if (mPriv->relative) {
+      VMMouseClient_RequestAbsolute();
+      mPriv->relative = FALSE;
+      xf86Msg(X_INFO, "VMWARE(0): vmmouse enable absolute mode\n");
+   }
+
    /*
     * First read the bytes in input device to clear the regular PS/2 fd so
     * we don't get called again.

commit aea9dd5694e3b6bdeb704c18dc7930ba412ff259
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Thu Nov 13 15:21:31 2008 -0800

    Don't flush buttons.
    
    Apply equivalent of commit 6a03e8bd9699a33dabcdd2bbcf51a001ddfd5534
    from xf86-input-mouse.

diff --git a/src/vmmouse.c b/src/vmmouse.c
index 84b27fb..9284c0e 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -603,8 +603,7 @@ VMMousePostEvent(InputInfoPtr pInfo, int buttons, int dx, 
int dy, int dz, int dw
  *
  * FlushButtons --
  *
- *     FlushButtons -- send button up events for sanity. It is called
- *     during DEVICE_ON in VMMouseDeviceControl
+ *     FlushButtons -- reset button states.
  *
  * Results:
  *     None
@@ -618,18 +617,8 @@ VMMousePostEvent(InputInfoPtr pInfo, int buttons, int dx, 
int dy, int dz, int dw
 static void
 FlushButtons(MouseDevPtr pMse)
 {
-
-    /* If no button down is pending xf86PostButtonEvent()
-     * will discard them. So we are on the safe side. */
-
-    int i, blocked;
-
     pMse->lastButtons = 0;
-
-    blocked = xf86BlockSIGIO ();
-    for (i = 1; i <= 5; i++)
-       xf86PostButtonEvent(pMse->device,0,i,0,0,0);
-    xf86UnblockSIGIO (blocked);
+    pMse->lastMappedButtons = 0;
 }
 
 

commit 93f032b80b841e1b6beeff814e8d9519e485fdef
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Mon Oct 27 09:32:22 2008 -0700

    Narrow down the scope of what systems are checked for the vmmouse device.

diff --git a/fdi/11-x11-vmmouse.fdi b/fdi/11-x11-vmmouse.fdi
index e725f9a..4455555 100644
--- a/fdi/11-x11-vmmouse.fdi
+++ b/fdi/11-x11-vmmouse.fdi
@@ -3,7 +3,9 @@
   <device>
     <match key="info.capabilities" contains="input.mouse">
       <match key="input.originating_device" contains="i8042_AUX_port">
-        <append key="info.callouts.add" 
type="strlist">hal-probe-vmmouse</append>
+        <match 
key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" 
string="VMware, Inc.">
+          <append key="info.callouts.add" 
type="strlist">hal-probe-vmmouse</append>
+        </match>
       </match>
     </match>
   </device>

commit c42ef00eaa590139cb872c086787aaa545eac273
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Thu Oct 23 23:35:56 2008 -0700

    Bump for 12.6.1 release.

diff --git a/configure.ac b/configure.ac
index f5eebd9..2b7b01b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-vmmouse],
-        12.6.0,
+        12.6.1,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-vmmouse)
 
diff --git a/src/vmmouse.c b/src/vmmouse.c
index b3389b3..84b27fb 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -95,7 +95,7 @@
  */
 #define VMMOUSE_MAJOR_VERSION 12
 #define VMMOUSE_MINOR_VERSION 6
-#define VMMOUSE_PATCHLEVEL 0
+#define VMMOUSE_PATCHLEVEL 1
 #define VMMOUSE_DRIVER_VERSION \
    (VMMOUSE_MAJOR_VERSION * 65536 + VMMOUSE_MINOR_VERSION * 256 + 
VMMOUSE_PATCHLEVEL)
 #define VMMOUSE_DRIVER_VERSION_STRING \

commit bcdec3d0cd4434770cd841c33c030e0d7203881f
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Thu Oct 23 23:35:28 2008 -0700

    Remove call to iopl(). It's not portable and isn't necessary.

diff --git a/tools/vmmouse_detect.c b/tools/vmmouse_detect.c
index e5f14a3..0dd4827 100644
--- a/tools/vmmouse_detect.c
+++ b/tools/vmmouse_detect.c
@@ -47,11 +47,6 @@ main(void)
    signal(SIGSEGV, segvCB);
 
 #if defined __i386__ || defined __x86_64__ 
-   /*
-    * To access i/o ports above 0x3ff, we need to be in iopl(3).
-    */
-
-   iopl(3);
    if (VMMouseClient_Enable()) {
       VMMouseClient_Disable();
       return 0;

commit ecb2f313292b4d3f516f5d1ae5c7cde45444041c
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Thu Oct 23 22:26:53 2008 -0700

    Bump version number for 12.6.0 release.

diff --git a/configure.ac b/configure.ac
index 90e3d22..f5eebd9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-vmmouse],
-        12.5.2,
+        12.6.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-vmmouse)
 
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 99daa92..b3389b3 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -94,8 +94,8 @@
  * Version constants
  */
 #define VMMOUSE_MAJOR_VERSION 12
-#define VMMOUSE_MINOR_VERSION 5
-#define VMMOUSE_PATCHLEVEL 2
+#define VMMOUSE_MINOR_VERSION 6
+#define VMMOUSE_PATCHLEVEL 0
 #define VMMOUSE_DRIVER_VERSION \
    (VMMOUSE_MAJOR_VERSION * 65536 + VMMOUSE_MINOR_VERSION * 256 + 
VMMOUSE_PATCHLEVEL)
 #define VMMOUSE_DRIVER_VERSION_STRING \

commit a9050a9d407f650b86ee28ff00f5717c965b4554
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Thu Oct 23 22:13:56 2008 -0700

    Switch hal-probe-vmmouse to /bin/sh and add Copyright statement.

diff --git a/tools/hal-probe-vmmouse.in b/tools/hal-probe-vmmouse.in
index 67e6149..1f75e25 100755
--- a/tools/hal-probe-vmmouse.in
+++ b/tools/hal-probe-vmmouse.in
@@ -1,4 +1,24 @@
-#!/bin/bash
+#!/bin/sh
+#
+#  Copyright 2008 VMware, Inc.
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files (the "Software"),
+#  to deal in the Software without restriction, including without limitation
+#  on the rights to use, copy, modify, merge, publish, distribute, sub
+#  license, and/or sell copies of the Software, and to permit persons to whom
+#  the Software is furnished to do so, subject to the following conditions:
+#
+#  The above copyright notice and this permission notice (including the next
+#  paragraph) shall be included in all copies or substantial portions of the
+#  Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+#  VMWARE, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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.
 
 [ -x __HAL_BIN_PREFIX__/hal-set-property ] || exit 0
 [ -x __BIN_PREFIX__/vmmouse_detect ] || exit 0

commit eb03e96c1974a3fbe1c48c56974ff32bc886c8f7
Author: Philip Langdale <phil...@fido2.homeip.net>
Date:   Thu Oct 23 21:54:44 2008 -0700

    Add HAL integration to support input hot plug.
    
     * vmmouse_detect: A simple program that detects whether a vmmouse
       device is present.
     * hal-probe-vmmouse: A HAL callout script that uses vmmouse_detect
       and overrides input.x11_driver.
     * 11-x11-vmmouse.fdi: fdi descriptor that adds the callout for PS/2
       mice.
    
    Additional 'configure' variables have been added to allow for overriding
    HAL paths, although this shouldn't usually be necessary.

diff --git a/Makefile.am b/Makefile.am
index de3a585..2e7b369 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,4 +19,4 @@
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 AUTOMAKE_OPTIONS = foreign
-SUBDIRS = shared src man
+SUBDIRS = shared src tools fdi man
diff --git a/README b/README
index 1e9e762..4205876 100644
--- a/README
+++ b/README
@@ -51,3 +51,16 @@ The driver is composed of three different layers:
      are still transmitted on the PS/2 port so it is necessary
      to be set up to receive those interrupts like a standard
      PS/2 driver, but the actual data on the PS/2 port is ignored.
+
+vmmouse_detect
+--------------
+
+A simple program to detect whether the vmmouse device is present.
+It is used by the HAL callout script to automatically detect a
+vmmouse device.
+
+Returns 0 if we are running in a virtual machine where the vmmouse
+device is present.
+
+Returns 1 otherwise (either we are not in a VM or the vmmouse device
+was disabled).
diff --git a/configure.ac b/configure.ac
index a389f3a..90e3d22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,32 @@ AC_ARG_WITH(xorg-module-dir,
 inputdir=${moduledir}/input
 AC_SUBST(inputdir)
 
+AC_ARG_WITH(hal_bin_dir,
+           AC_HELP_STRING([--with-hal-bin-dir=DIR],
+                          [Directory where HAL binaries where installed 
[[default=$bindir]]]),
+           [halbindir="$withval"],
+           [halbindir="$bindir"])
+HAL_BIN_DIR=${halbindir}
+AC_SUBST(HAL_BIN_DIR)
+
+AC_ARG_WITH(hal_callouts_dir,
+           AC_HELP_STRING([--with-hal-callouts-dir=DIR],
+                          [Directory where HAL expects its callout scripts to 
be located
+                           [[default=$libdir/hal]]]),
+           [halcalloutsdir="$withval"],
+           [halcalloutsdir="$libdir/hal"])
+HAL_CALLOUTS_DIR=${halcalloutsdir}
+AC_SUBST(HAL_CALLOUTS_DIR)
+
+AC_ARG_WITH(hal_fdi_dir,
+           AC_HELP_STRING([--with-hal-fdi-dir=DIR],
+                          [Directory where HAL expects its fdi files to be 
located
+                          [[default=$datadir/hal/fdi/policy/20thirdparty]]]),
+           [halfdidir="$withval"],
+           [halfdidir="$datadir/hal/fdi/policy/20thirdparty"])
+HAL_FDI_DIR=${halfdidir}
+AC_SUBST(HAL_FDI_DIR)
+
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
@@ -101,4 +127,4 @@ AC_HEADER_STDC
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
 
-AC_OUTPUT([Makefile shared/Makefile src/Makefile man/Makefile])
+AC_OUTPUT([Makefile shared/Makefile src/Makefile tools/Makefile fdi/Makefile 
man/Makefile])
diff --git a/fdi/11-x11-vmmouse.fdi b/fdi/11-x11-vmmouse.fdi
new file mode 100644
index 0000000..e725f9a
--- /dev/null
+++ b/fdi/11-x11-vmmouse.fdi
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<deviceinfo version="0.2">
+  <device>
+    <match key="info.capabilities" contains="input.mouse">
+      <match key="input.originating_device" contains="i8042_AUX_port">
+        <append key="info.callouts.add" 
type="strlist">hal-probe-vmmouse</append>
+      </match>
+    </match>
+  </device>
+</deviceinfo>
diff --git a/fdi/Makefile.am b/fdi/Makefile.am
new file mode 100644
index 0000000..4581f27
--- /dev/null
+++ b/fdi/Makefile.am
@@ -0,0 +1,25 @@
+#  Copyright 2008 VMware, Inc.
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files (the "Software"),
+#  to deal in the Software without restriction, including without limitation
+#  on the rights to use, copy, modify, merge, publish, distribute, sub
+#  license, and/or sell copies of the Software, and to permit persons to whom
+#  the Software is furnished to do so, subject to the following conditions:
+#
+#  The above copyright notice and this permission notice (including the next
+#  paragraph) shall be included in all copies or substantial portions of the
+#  Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+#  VMWARE, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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.
+
+fdidir=$(HAL_FDI_DIR)
+fdi_DATA = 11-x11-vmmouse.fdi
+
+EXTRA_DIST = 11-x11-vmmouse.fdi
+
diff --git a/man/Makefile.am b/man/Makefile.am
index f0eb29b..1f31487 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -24,13 +24,15 @@
 # from the copyright holders.
 # 
 
+man_MANS = @driver_n...@_detect.1
+
 drivermandir = $(DRIVER_MAN_DIR)
 
 driverman_PRE = @driver_n...@.man
 
 driverman_DATA = $(driverman_PRE:m...@driver_man_suffix@)
 
-EXTRA_DIST = @driver_n...@.man
+EXTRA_DIST = @driver_n...@.man @driver_n...@_detect.1
 
 CLEANFILES = $(driverman_DATA)
 
diff --git a/man/vmmouse_detect.1 b/man/vmmouse_detect.1
new file mode 100644
index 0000000..ca1ec71
--- /dev/null
+++ b/man/vmmouse_detect.1
@@ -0,0 +1,58 @@
+.\" This manpage is copyright (C) 2007 Canonical, Ltd
+.\" Author: Bryce Harrington <br...@ubuntu.com>
+.\"
+.\" This is free software; you may redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2,
+.\" or (at your option) any later version.
+.\"
+.\" This is distributed in the hope that it will be useful, but
+.\" WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with the Debian GNU/Linux system; if not, write to the Free
+.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+.\" 02111-1307 USA
+.\"
+.\" That's right, although mdetect itself is under the QPL, this manpage is
+.\" under the GPL.  Enjoy!
+.TH vmmouse_detect 1 "2007-07-19" "Debian GNU/Linux"
+.SH NAME
+vmmouse_detect \- VMware mouse device autodetection tool
+.SH SYNOPSIS
+vmmouse_detect
+.SH OPTIONS
+vmmouse_detect has no options
+.SH DESCRIPTION
+.B vmmouse_detect
+is a tool for detecting if running in a VMware environment where vmmouse
+is used.  It exits with a 0 return value if the vmmouse client is
+enabled, and 1 if not.
+.SH DIAGNOSTICS
+.BR vmmouse_detect 's
+exit status is used to communicate information.
+.IP 0
+.B vmmouse_detect
+found a mouse and exited normally.
+.IP 1
+Either the vmmouse client was not enabled, or it is not being run from
+within a VMware virtual machine.
+.SH BUGS
+Please report bugs in
+.B vmmouse_detect
+<https://bugs.launchpad.net/ubuntu/+source/mdetect/vmmouse_detect>.
+.SH AUTHORS
+.B vmmouse_detect
+is copyright 2007 VMware, Inc.
+.SH LICENSING
+The
+.B vmmouse_detect
+source code is licensed under a BSD-like license.  See COPYING for
+details.
+.PP
+This manual page is licensed under the GNU General Public License.
+.SH SEE ALSO
+.IR mdetect (1),
+.IR XFree86 (1)
diff --git a/tools/Makefile.am b/tools/Makefile.am
new file mode 100644
index 0000000..9236c5f
--- /dev/null
+++ b/tools/Makefile.am
@@ -0,0 +1,39 @@
+#  Copyright 2008 VMware, Inc.
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files (the "Software"),
+#  to deal in the Software without restriction, including without limitation
+#  on the rights to use, copy, modify, merge, publish, distribute, sub
+#  license, and/or sell copies of the Software, and to permit persons to whom
+#  the Software is furnished to do so, subject to the following conditions:
+#
+#  The above copyright notice and this permission notice (including the next
+#  paragraph) shall be included in all copies or substantial portions of the
+#  Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+#  VMWARE, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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.
+
+bin_PROGRAMS = @driver_n...@_detect
+
+SHARED_PATH = $(top_srcdir)/shared
+INCLUDES = -I$(SHARED_PATH)
+
+...@driver_name@_detect_SOURCES = vmmouse_detect.c
+...@driver_name@_detect_LDADD = $(SHARED_PATH)/l...@driver_name@.la
+
+calloutsdir=$(HAL_CALLOUTS_DIR)
+callouts_SCRIPTS = hal-probe-vmmouse
+
+hal-probe-vmmouse:
+       sed -e 's|__BIN_PREFIX__|$(bindir)|g' \
+           -e 's|__HAL_BIN_PREFIX__|$(HAL_BIN_DIR)|g' \
+           < $...@.in > $@
+
+EXTRA_DIST = hal-probe-vmmouse.in
+
+CLEANFILES = hal-probe-vmmouse
diff --git a/tools/hal-probe-vmmouse.in b/tools/hal-probe-vmmouse.in
new file mode 100755
index 0000000..67e6149
--- /dev/null
+++ b/tools/hal-probe-vmmouse.in
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+[ -x __HAL_BIN_PREFIX__/hal-set-property ] || exit 0
+[ -x __BIN_PREFIX__/vmmouse_detect ] || exit 0
+
+__BIN_PREFIX__/vmmouse_detect
+if [ $? -eq 0 ]; then
+   __HAL_BIN_PREFIX__/hal-set-property --direct --udi "$UDI" --key 
input.x11_driver --string "vmmouse"
+fi
+
diff --git a/tools/vmmouse_detect.c b/tools/vmmouse_detect.c
new file mode 100644
index 0000000..e5f14a3
--- /dev/null
+++ b/tools/vmmouse_detect.c


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to