[PATCH vmmouse] Handle DEVICE_ABORT on ABI 19.1

Peter Hutterer peter.hutterer at who-t.net
Tue Jan 29 19:20:06 PST 2013


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

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 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;
-- 
1.8.1



More information about the xorg-devel mailing list