[PATCH synaptics] eventcomm: ungrab the device on DeviceOff

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 3 14:37:11 PST 2013


For symmetry, the kernel should ungrab when we close the fd.

Reported-by: Kristian Høgsberg <krh at bitplanet.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/eventcomm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 7b9a403..35167bb 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -233,7 +233,11 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para)
 static Bool
 EventDeviceOffHook(InputInfoPtr pInfo)
 {
+    SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
+    struct eventcomm_proto_data *proto_data = priv->proto_data;
+
     UninitializeTouch(pInfo);
+    libevdev_grab(proto_data->evdev, LIBEVDEV_UNGRAB);
 
     return Success;
 }
-- 
1.8.3.1



More information about the xorg-devel mailing list