From 241254e352f5c4e3d6850e0916261cb235c6b608 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Mar 2011 11:23:34 +1000 Subject: Don't autoprobe for devices when Option Device is set. If only Option Device is set but no protocol, the code calls into AutoDevProbe. eventcomm (the only backend with an AutoDevProbe) then runs through all /dev/input/event devices and takes the first one it can find. If two touchpads are connected on a system, this may cause the same touchpad to be added twice and the other one not at all - even though the device path is specified. (This can only happen when the event device is not grabbed, otherwise the grabcheck prevents the touchpad from being added twice) Pass the device option into AutoDevProbe and check that device first. If it is a touchpad, finish with success. If it isn't, fail AutoDevProbe. Introduced in dce6006f6a851be4147e16731caa453dd0d1ec1c. Signed-off-by: Peter Hutterer CC: Alexandr Shadchin Reviewed-by: Chris Bagwell --- src/synproto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/synproto.h') diff --git a/src/synproto.h b/src/synproto.h index 251dc84..75f90e4 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -75,7 +75,7 @@ struct SynapticsProtocolOperations { Bool (*QueryHardware)(InputInfoPtr pInfo); Bool (*ReadHwState)(InputInfoPtr pInfo, struct CommData *comm, struct SynapticsHwState *hwRet); - Bool (*AutoDevProbe)(InputInfoPtr pInfo); + Bool (*AutoDevProbe)(InputInfoPtr pInfo, const char *device); void (*ReadDevDimensions)(InputInfoPtr pInfo); }; -- cgit v1.2.3