summaryrefslogtreecommitdiff
path: root/src/vmmouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vmmouse.c')
-rw-r--r--src/vmmouse.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 5543c4c..2c2683b 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -919,9 +919,18 @@ GetVMMouseMotionEvent(InputInfoPtr pInfo){
int buttons, dx, dy, dz, dw;
VMMOUSE_INPUT_DATA vmmouseInput;
int ps2Buttons = 0;
+ int numPackets;
pMse = pInfo->private;
- while(VMMouseClient_GetInput(&vmmouseInput)){
+ while((numPackets = VMMouseClient_GetInput(&vmmouseInput))){
+ if (numPackets == VMMOUSE_ERROR) {
+ VMMouseClient_Disable();
+ VMMouseClient_Enable();
+ VMMouseClient_RequestAbsolute();
+ xf86Msg(X_INFO, "VMWARE(0): re-requesting absolute mode after reset\n");
+ break;
+ }
+
if(vmmouseInput.Buttons & VMMOUSE_MIDDLE_BUTTON)
ps2Buttons |= 0x04; /* Middle*/
if(vmmouseInput.Buttons & VMMOUSE_RIGHT_BUTTON)