forked from pool/xf86-input-synaptics
- Update to version 1.9.0: This release supports the X server 1.19. - Update to version 1.8.99.2: + Remove upstream patch U_conf-rename-to-70-synaptics.conf.patch + Adapt n_xf86-input-synaptics-wait.diff OBS-URL: https://build.opensuse.org/request/show/440982 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xf86-input-synaptics?expand=0&rev=56
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
---
|
|
src/eventcomm.c | 14 ++++++++++++--
|
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
|
|
--- a/src/eventcomm.c
|
|
+++ b/src/eventcomm.c
|
|
@@ -889,6 +889,8 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
|
|
int i;
|
|
Bool touchpad_found = FALSE;
|
|
struct dirent **namelist;
|
|
+ int wait = 0;
|
|
+ const int max_wait = 2000;
|
|
|
|
if (device) {
|
|
int fd = -1;
|
|
@@ -919,6 +921,7 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
|
|
return touchpad_found;
|
|
}
|
|
|
|
+ while (wait <= max_wait && !touchpad_found) {
|
|
i = scandir(DEV_INPUT_EVENT, &namelist, EventDevOnly, alphasort);
|
|
if (i < 0) {
|
|
xf86IDrvMsg(pInfo, X_ERROR, "Couldn't open %s\n", DEV_INPUT_EVENT);
|
|
@@ -949,8 +952,8 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
|
|
touchpad_found = event_query_is_touchpad(evdev);
|
|
libevdev_free(evdev);
|
|
if (touchpad_found) {
|
|
- xf86IDrvMsg(pInfo, X_PROBED, "auto-dev sets device to %s\n",
|
|
- fname);
|
|
+ xf86IDrvMsg(pInfo, X_PROBED, "auto-dev sets device to %s (waited %d msec)\n",
|
|
+ fname, wait);
|
|
pInfo->options = xf86ReplaceStrOption(pInfo->options,
|
|
"Device",
|
|
fname);
|
|
@@ -960,6 +963,13 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
|
|
}
|
|
free(namelist[i]);
|
|
}
|
|
+ if (!touchpad_found) {
|
|
+ xf86IDrvMsg(pInfo, X_ERROR, "waiting 100 msec to become devices ready\n");
|
|
+ usleep(100*1000);
|
|
+ wait += 100;
|
|
+ xf86IDrvMsg(pInfo, X_ERROR, "aiting time total: %d\n", wait);
|
|
+ }
|
|
+ } /* while (wait <= max_wait && !touchpad_found) */
|
|
|
|
free(namelist);
|
|
|