diff options
author | Peter Osterlund <petero2@telia.com> | 2005-10-23 09:22:21 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:03:33 +0200 |
commit | 0e5eb63ec4d4a652b8761fab906df3e9b13a2347 (patch) | |
tree | a59421ab3d3e380beebfaabf3a69c1811db81fe3 | |
parent | 7fcfad931ba56e10ae56de04d7ed9d47a17b8aa5 (diff) |
Make the device name change code handle more cases. Patch
from Karl Tomlinson <k.tomlinson@auckland.ac.nz>, who writes:
There are two issues that are resolved here:
1 The call to xf86ReplaceStrOption in DeviceOn, when the device
file can no longer be opened seems unnecessary and causes
problems. If Protocol is auto-dev then Device is reset anyway
(through SetDeviceAndProtocol). If Protocol is something else
then the device file will never be found even after it is
recreated because Device is never set again.
2 The first xf86OpenSerial in DeviceOn may successfully open a
different mouse (or other event file) that has the same name as
the Device found through the first invocation of auto-dev. It
seems reasonable that if auto-dev is used to find the device
file the first time, then it can be used to find it again after
the device has been closed (and possibly changed name).
-rw-r--r-- | synaptics.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/synaptics.c b/synaptics.c index 726ae01..32a26fe 100644 --- a/synaptics.c +++ b/synaptics.c @@ -524,13 +524,9 @@ DeviceOn(DeviceIntPtr dev) DBG(3, ErrorF("Synaptics DeviceOn called\n")); + SetDeviceAndProtocol(local); local->fd = xf86OpenSerial(local->options); if (local->fd == -1) { - xf86ReplaceStrOption(local->options, "Device", ""); - SetDeviceAndProtocol(local); - local->fd = xf86OpenSerial(local->options); - } - if (local->fd == -1) { xf86Msg(X_WARNING, "%s: cannot open input device\n", local->name); return !Success; } |