Patch to vmmouse to stop mouse button releases from being missed.

Peter Hutterer peter.hutterer at who-t.net
Thu May 19 21:10:44 PDT 2011


On Wed, May 18, 2011 at 11:03:38PM +0100, Stephen Brooks wrote:
> Hi all,
> I've found a problem with the vmmouse (Vmware mouse driver) that means
> it looses button presses. It a sort of edge case but we've tripped
> over it.
> 
> Attached is a patch I think I've done it correctly so please be kind. :)
> 
> This patch is for the latest version but I believe the bugs has been
> there a long time....
> 
> -- 
> Stephen Brooks

> From 39746f912f8108c83b83f80febc099db11c7f7e2 Mon Sep 17 00:00:00 2001
> From: Stephen Brooks <nightbikeman at gmail.com>
> Date: Wed, 18 May 2011 22:48:34 +0100
> Subject: [PATCH] Signed-off-by: Stephen Brooks <nightbikeman at gmail.com>
> 
> Reset ps2buttons to avoid button messages from being discarded.
> ---
>  src/vmmouse.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/vmmouse.c b/src/vmmouse.c
> index ad014ec..9a21d7a 100644
> --- a/src/vmmouse.c
> +++ b/src/vmmouse.c
> @@ -1080,12 +1080,12 @@ GetVMMouseMotionEvent(InputInfoPtr pInfo){
>     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))){
> +      int ps2Buttons = 0;
>        if (numPackets == VMMOUSE_ERROR) {
>           VMMouseClient_Disable();
>           VMMouseClient_Enable();
> -- 
> 1.7.4.4
> 
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
  Peter


More information about the xorg-devel mailing list