Bug#469166: (no subject)
There, a patch that's actually tested and documented.
diff -ru xfree86-driver-synaptics-0.14.7~git20070706-old/manpages/syndaemon.1 xfree86-driver-synaptics-0.14.7~git20070706/manpages/syndaemon.1
--- xfree86-driver-synaptics-0.14.7~git20070706-old/manpages/syndaemon.1 2008-03-03 16:26:49.000000000 +0200
+++ xfree86-driver-synaptics-0.14.7~git20070706/manpages/syndaemon.1 2008-03-03 16:54:12.000000000 +0200
@@ -40,6 +40,12 @@
to keyboard activity.
.LP
.TP
+\fB\-f\fR <\fIpoll-frequency\fP>
+Set keyboard polling frequency in milliseconds.
+.
+(default is 20ms).
+.LP
+.TP
\fB\-k\fP
Ignore modifier keys when monitoring keyboard activity.
.LP
diff -ru xfree86-driver-synaptics-0.14.7~git20070706-old/syndaemon.c xfree86-driver-synaptics-0.14.7~git20070706/syndaemon.c
--- xfree86-driver-synaptics-0.14.7~git20070706-old/syndaemon.c 2008-03-03 16:26:49.000000000 +0200
+++ xfree86-driver-synaptics-0.14.7~git20070706/syndaemon.c 2008-03-03 16:51:36.000000000 +0200
@@ -49,6 +49,7 @@
fprintf(stderr, " -d Start as a daemon, ie in the background.\n");
fprintf(stderr, " -p Create a pid file with the specified name.\n");
fprintf(stderr, " -t Only disable tapping and scrolling, not mouse movements.\n");
+ fprintf(stderr, " -f Set polling frequency in milliseconds. (default is 20ms)\n");
fprintf(stderr, " -k Ignore modifier keys when monitoring keyboard activity.\n");
fprintf(stderr, " -K Like -k but also ignore Modifier+Key combos.\n");
exit(1);
@@ -159,9 +160,8 @@
}
static void
-main_loop(Display *display, double idle_time)
+main_loop(Display *display, double idle_time, const unsigned int poll_delay)
{
- const int poll_delay = 20000; /* 20 ms */
double last_activity = 0.0;
double current_time;
@@ -232,9 +232,10 @@
int c;
int shmid;
int ignore_modifier_keys = 0;
+ unsigned int poll_delay = 20000; /* 20 ms */
/* Parse command line parameters */
- while ((c = getopt(argc, argv, "i:dtp:kK?")) != EOF) {
+ while ((c = getopt(argc, argv, "i:dtp:f:kK?")) != EOF) {
switch(c) {
case 'i':
idle_time = atof(optarg);
@@ -248,6 +249,9 @@
case 'p':
pid_file = optarg;
break;
+ case 'f':
+ poll_delay = atoi(optarg) * 1000;
+ break;
case 'k':
ignore_modifier_keys = 1;
break;
@@ -314,7 +318,7 @@
setup_keyboard_mask(display, ignore_modifier_keys);
/* Run the main loop */
- main_loop(display, idle_time);
+ main_loop(display, idle_time, poll_delay);
return 0;
}
Reply to: