ChangeLog | 37 +++++++++++++++++++++++++++++++++- configure.ac | 8 +++---- debian/changelog | 6 +++++ man/vmmouse.man | 2 - shared/vmmouse_defs.h | 6 +++++ shared/vmmouse_proto.h | 9 ++++++++ src/vmmouse.c | 53 ++++++++++++++++++++++++++++++++++--------------- tools/vmmouse_detect.c | 6 +++++ 8 files changed, 105 insertions(+), 22 deletions(-)
New commits: commit 7a7b7007f52e1a8af69f3e6e547e5bb00b0e4eab Author: Brice Goglin <[email protected]> Date: Mon May 11 20:13:28 2009 +0200 Prepare changelog for upload diff --git a/debian/changelog b/debian/changelog index 7ab1f5b..80f6650 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -xserver-xorg-input-vmmouse (1:12.6.4-1) UNRELEASED; urgency=low +xserver-xorg-input-vmmouse (1:12.6.4-1) unstable; urgency=low * New upstream release. - -- Brice Goglin <[email protected]> Mon, 11 May 2009 20:06:53 +0200 + -- Brice Goglin <[email protected]> Mon, 11 May 2009 20:13:16 +0200 xserver-xorg-input-vmmouse (1:12.6.3-2) unstable; urgency=low commit 66f4d846ef477c69db55401af4e0106fd4a42e90 Author: Brice Goglin <[email protected]> Date: Mon May 11 20:07:15 2009 +0200 New upstream release diff --git a/ChangeLog b/ChangeLog index 8f44fb7..f8904ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,38 @@ +commit d61609868697825717d2f6a63b2a6177cb13873b +Author: Shelley Gong <[email protected]> +Date: Mon May 11 10:08:56 2009 -0700 + + 1) Fix bug where motion notify events were being sent with every button event. + + 2) Classify relative vs. absolute packets individually rather than from a + global flag. + + 3) Compile with older distros. + + 4) Bump for 12.6.4 Release. + + Signed-off-by: Philip Langdale <[email protected]> + +commit d5ae42ec3849672438823b08ad06a69289ae99c5 +Author: Alan Coopersmith <[email protected]> +Date: Thu May 7 15:53:32 2009 -0700 + + Map Solaris/Sun compiler #defines to gcc equivalents + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 9719534fa3a184b848ef9e9c3a755703b8708fd2 +Author: Alan Coopersmith <[email protected]> +Date: Thu Jan 15 07:29:44 2009 -0800 + + Make --with-hal* configure options match their help output + +commit 5e43144376bfa4491f60dc4da34f8bde9da2f900 +Author: Alan Coopersmith <[email protected]> +Date: Fri Jan 9 16:23:49 2009 -0800 + + Remove xorgconfig & xorgcfg from See Also list in man page + commit bc324161680b1403e5811b3ac2b9ca679829a5c9 Author: Peter Hutterer <[email protected]> Date: Mon Dec 22 14:19:30 2008 +1000 @@ -250,7 +285,7 @@ Date: Mon Sep 10 21:17:12 2007 -0700 Guard modinfo section against gcc. commit b20b4c2388a19885b8d686bbc184d69bed5585d9 -Merge: 0cd80f9... d8e1d4d... +Merge: 0cd80f9 d8e1d4d Author: Philip Langdale <[email protected]> Date: Mon Sep 10 20:46:13 2007 -0700 diff --git a/debian/changelog b/debian/changelog index 356b826..7ab1f5b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xserver-xorg-input-vmmouse (1:12.6.4-1) UNRELEASED; urgency=low + + * New upstream release. + + -- Brice Goglin <[email protected]> Mon, 11 May 2009 20:06:53 +0200 + xserver-xorg-input-vmmouse (1:12.6.3-2) unstable; urgency=low * Upload to unstable. commit d61609868697825717d2f6a63b2a6177cb13873b Author: Shelley Gong <[email protected]> Date: Mon May 11 10:08:56 2009 -0700 1) Fix bug where motion notify events were being sent with every button event. 2) Classify relative vs. absolute packets individually rather than from a global flag. 3) Compile with older distros. 4) Bump for 12.6.4 Release. Signed-off-by: Philip Langdale <[email protected]> diff --git a/configure.ac b/configure.ac index 118ae84..ab39f6c 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-input-vmmouse], - 12.6.3, + 12.6.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-input-vmmouse) diff --git a/shared/vmmouse_defs.h b/shared/vmmouse_defs.h index 8dc769e..d256faf 100644 --- a/shared/vmmouse_defs.h +++ b/shared/vmmouse_defs.h @@ -57,6 +57,12 @@ #define VMMOUSE_ERROR 0xffff0000 /* + * VMMouse Input packet flags + */ +#define VMMOUSE_MOVE_RELATIVE 1 +#define VMMOUSE_MOVE_ABSOLUTE 0 + +/* * VMMouse Input button flags */ #define VMMOUSE_LEFT_BUTTON 0x20 diff --git a/src/vmmouse.c b/src/vmmouse.c index a712bd5..deec8c8 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 2 +#define VMMOUSE_PATCHLEVEL 4 #define VMMOUSE_DRIVER_VERSION \ (VMMOUSE_MAJOR_VERSION * 65536 + VMMOUSE_MINOR_VERSION * 256 + VMMOUSE_PATCHLEVEL) #define VMMOUSE_DRIVER_VERSION_STRING \ @@ -138,9 +138,11 @@ static void MouseCtrl(DeviceIntPtr device, PtrCtrl *ctrl); * Definitions *****************************************************************************/ typedef struct { - int screenNum; - Bool vmmouseAvailable; - Bool relative; + int screenNum; + Bool vmmouseAvailable; + VMMOUSE_INPUT_DATA vmmousePrevInput; + Bool isCurrRelative; + Bool absoluteRequested; } VMMousePrivRec, *VMMousePrivPtr; static const char *reqSymbols[] = { @@ -311,7 +313,7 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags) return NULL; } - mPriv->relative = TRUE; + mPriv->absoluteRequested = FALSE; /* * try to enable vmmouse here @@ -479,6 +481,7 @@ VMMouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy) VMMousePrivPtr mPriv; int truebuttons; int id, change; + Bool mouseMoved = FALSE; pMse = pInfo->private; mPriv = (VMMousePrivPtr)pMse->mousePriv; @@ -492,7 +495,14 @@ VMMouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy) buttons = reverseBits(reverseMap, buttons); - if (dx || dy) { + if (mPriv->isCurrRelative) { + mouseMoved = dx || dy; + } else { + mouseMoved = (dx != mPriv->vmmousePrevInput.X) || + (dy != mPriv->vmmousePrevInput.Y) || + (mPriv->vmmousePrevInput.Flags & VMMOUSE_MOVE_RELATIVE); + } + if (mouseMoved) { #ifdef CALL_CONVERSION_PROC /* @@ -501,7 +511,7 @@ VMMouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy) */ VMMouseConvertProc(pInfo, 0, 2, dx, dy, 0, 0, 0, 0, &dx, &dy); #endif - xf86PostMotionEvent(pInfo->dev, !mPriv->relative, 0, 2, dx, dy); + xf86PostMotionEvent(pInfo->dev, !mPriv->isCurrRelative, 0, 2, dx, dy); } if (truebuttons != pMse->lastButtons) { @@ -549,7 +559,7 @@ VMMousePostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy, int dz, int dw break; case MSE_MAPTOX: if (dz != 0) { - if(mPriv->relative) + if(mPriv->isCurrRelative) dx = dz; else dx += dz; @@ -558,7 +568,7 @@ VMMousePostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy, int dz, int dw break; case MSE_MAPTOY: if (dz != 0) { - if(mPriv->relative) + if(mPriv->isCurrRelative) dy = dz; else dy += dz; @@ -593,7 +603,7 @@ VMMousePostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy, int dz, int dw */ if (zbutton) { buttons &= ~zbutton; - if(mPriv->relative) + if(mPriv->isCurrRelative) VMMouseDoPostEvent(pInfo, buttons, 0, 0); else VMMouseDoPostEvent(pInfo, buttons, dx, dy); @@ -621,7 +631,6 @@ static void FlushButtons(MouseDevPtr pMse) { pMse->lastButtons = 0; - pMse->lastMappedButtons = 0; } @@ -865,8 +874,8 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode) VMMousePrivPtr mPriv = (VMMousePrivPtr)pMse->mousePriv; if( mPriv->vmmouseAvailable ) { VMMouseClient_Disable(); - mPriv->vmmouseAvailable = FALSE; - mPriv->relative = TRUE; + mPriv->vmmouseAvailable = FALSE; + mPriv->absoluteRequested = FALSE; } xf86RemoveEnabledDevice(pInfo); @@ -916,9 +925,14 @@ VMMouseReadInput(InputInfoPtr pInfo) pMse = pInfo->private; mPriv = pMse->mousePriv; - if (mPriv->relative) { + if (!mPriv->absoluteRequested) { + /* + * We can request for absolute mode, but it depends on + * host whether it will send us absolute or relative + * position. + */ VMMouseClient_RequestAbsolute(); - mPriv->relative = FALSE; + mPriv->absoluteRequested = TRUE; xf86Msg(X_INFO, "VMWARE(0): vmmouse enable absolute mode\n"); } @@ -973,12 +987,14 @@ VMMouseReadInput(InputInfoPtr pInfo) static void GetVMMouseMotionEvent(InputInfoPtr pInfo){ MouseDevPtr pMse; + VMMousePrivPtr mPriv; int buttons, dx, dy, dz, dw; VMMOUSE_INPUT_DATA vmmouseInput; int ps2Buttons = 0; int numPackets; pMse = pInfo->private; + mPriv = (VMMousePrivPtr)pMse->mousePriv; while((numPackets = VMMouseClient_GetInput(&vmmouseInput))){ if (numPackets == VMMOUSE_ERROR) { VMMouseClient_Disable(); @@ -1003,8 +1019,13 @@ GetVMMouseMotionEvent(InputInfoPtr pInfo){ dy = vmmouseInput.Y; dz = (char)vmmouseInput.Z; dw = 0; + /* + * Get the per package relative or absolute information. + */ + mPriv->isCurrRelative = vmmouseInput.Flags & VMMOUSE_MOVE_RELATIVE; /* post an event */ pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); + mPriv->vmmousePrevInput = vmmouseInput; } } @@ -1106,7 +1127,7 @@ VMMouseConvertProc(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v if (first != 0 || num != 2) return FALSE; - if(mPriv->relative) { + if(mPriv->isCurrRelative) { *x = v0; *y = v1; } else { diff --git a/tools/vmmouse_detect.c b/tools/vmmouse_detect.c index 0dd4827..ac238b4 100644 --- a/tools/vmmouse_detect.c +++ b/tools/vmmouse_detect.c @@ -30,10 +30,16 @@ #include <signal.h> #include "vmmouse_client.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + void segvCB(int sig) { +#if defined HAVE_XORG_SERVER_1_1_0 exit(1); +#endif } commit d5ae42ec3849672438823b08ad06a69289ae99c5 Author: Alan Coopersmith <[email protected]> Date: Thu May 7 15:53:32 2009 -0700 Map Solaris/Sun compiler #defines to gcc equivalents Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/shared/vmmouse_proto.h b/shared/vmmouse_proto.h index a2eb1e4..9d7cb22 100644 --- a/shared/vmmouse_proto.h +++ b/shared/vmmouse_proto.h @@ -49,6 +49,15 @@ #include "xf86_libc.h" #endif +/* Map Solaris/Sun compiler #defines to gcc equivalents */ +#if !defined __i386__ && defined __i386 +# define __i386__ +#endif + +#if !defined __x86_64__ && defined __amd64 +# define __x86_64__ +#endif + #if !defined __i386__ && !defined __x86_64__ #error The vmmouse protocol is only supported on x86 architectures. #endif commit 9719534fa3a184b848ef9e9c3a755703b8708fd2 Author: Alan Coopersmith <[email protected]> Date: Thu Jan 15 07:29:44 2009 -0800 Make --with-hal* configure options match their help output diff --git a/configure.ac b/configure.ac index 5c5f639..118ae84 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,7 @@ AC_ARG_WITH(xorg-module-dir, inputdir=${moduledir}/input AC_SUBST(inputdir) -AC_ARG_WITH(hal_bin_dir, +AC_ARG_WITH(hal-bin-dir, AC_HELP_STRING([--with-hal-bin-dir=DIR], [Directory where HAL binaries where installed [[default=$bindir]]]), [halbindir="$withval"], @@ -78,7 +78,7 @@ AC_ARG_WITH(hal_bin_dir, HAL_BIN_DIR=${halbindir} AC_SUBST(HAL_BIN_DIR) -AC_ARG_WITH(hal_callouts_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]]]), @@ -87,7 +87,7 @@ AC_ARG_WITH(hal_callouts_dir, HAL_CALLOUTS_DIR=${halcalloutsdir} AC_SUBST(HAL_CALLOUTS_DIR) -AC_ARG_WITH(hal_fdi_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]]]), commit 5e43144376bfa4491f60dc4da34f8bde9da2f900 Author: Alan Coopersmith <[email protected]> Date: Fri Jan 9 16:23:49 2009 -0800 Remove xorgconfig & xorgcfg from See Also list in man page diff --git a/man/vmmouse.man b/man/vmmouse.man index c74f074..6ca1eb5 100644 --- a/man/vmmouse.man +++ b/man/vmmouse.man @@ -41,7 +41,7 @@ See the .B mouse(__drivermansuffix__) man page for details on these options. .SH "SEE ALSO" -__xservername__(1), __xconfigfile__(__filemansuffix__), xorgconfig(1), Xserver(1), X(__miscmansuffix__), +__xservername__(1), __xconfigfile__(__filemansuffix__), Xserver(1), X(__miscmansuffix__), mouse(__drivermansuffix__) .SH AUTHORS Copyright (c) 1999-2007 VMware, Inc. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

