summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@fido2.homeip.net>2008-11-13 15:43:31 -0800
committerPhilip Langdale <philipl@fido2.homeip.net>2008-11-13 15:43:31 -0800
commita5718c9b31d5fb72a88c0e145766efd861e0a3d3 (patch)
tree2af8ec7534fc5f290604482a567d5dfbde738db3
parentaea9dd5694e3b6bdeb704c18dc7930ba412ff259 (diff)
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.
-rw-r--r--src/vmmouse.c12
1 files changed, 10 insertions, 2 deletions
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.