From 3d5b85d62c11a9f816dbcc041cb2ac2150af666d Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 30 Jan 2013 10:54:11 +1000
Subject: [PATCH 07/14] Handle DEVICE_ABORT on ABI 19.1

Called on server abort, so let's just do the absolute minimum.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
---
 src/vmmouse.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/vmmouse.c b/src/vmmouse.c
index cac8306..fb053c2 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -1017,6 +1017,15 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
       usleep(300000);
       break;
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) * 100 + GET_ABI_MINOR(ABI_XINPUT_VERSION) >= 1901
+   case  DEVICE_ABORT:
+      if (pInfo->fd != -1) {
+	 VMMousePrivPtr mPriv = (VMMousePrivPtr)pMse->mousePriv;
+	 if( mPriv->vmmouseAvailable )
+	    VMMouseClient_Disable();
+         break;
+      }
+#endif
    }
 
    return Success;
-- 
2.3.0

