summaryrefslogtreecommitdiff
path: root/tools/syndaemon.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-03-12 14:11:29 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-03-12 14:13:18 +1000
commit17bbcad28000bbd896a33047c0720ada89e05f5d (patch)
tree3e2969351e42ee8482e1e482902b3d0e2ba265dd /tools/syndaemon.c
parentb40a5255fe73f7f95c8ff7145dd91605f3430119 (diff)
Revert "Add another third state to TouchpadOff for disabling all but button clicks"
This third state is not needed, the behaviour of the touchpad driver is now good enough to not need an external syndaemon instance to toggle this third state. This reverts commit eea73358760c7ff9c9dac061f265753637c6f25c. Conflicts: man/synaptics.man src/synaptics.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools/syndaemon.c')
-rw-r--r--tools/syndaemon.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/tools/syndaemon.c b/tools/syndaemon.c
index b181d16..29e75f5 100644
--- a/tools/syndaemon.c
+++ b/tools/syndaemon.c
@@ -50,8 +50,7 @@
enum TouchpadState {
TouchpadOn = 0,
TouchpadOff = 1,
- TappingOff = 2,
- ClickOnly = 3
+ TappingOff = 2
};
static Bool pad_disabled
@@ -74,7 +73,7 @@ static void
usage(void)
{
fprintf(stderr,
- "Usage: syndaemon [-i idle-time] [-m poll-delay] [-d] [-t [off|tapping|click-only]] [-k]\n");
+ "Usage: syndaemon [-i idle-time] [-m poll-delay] [-d] [-t] [-k]\n");
fprintf(stderr,
" -i How many seconds to wait after the last key press before\n");
fprintf(stderr, " enabling the touchpad. (default is 2.0s)\n");
@@ -83,10 +82,7 @@ usage(void)
fprintf(stderr, " -d Start as a daemon, i.e. in the background.\n");
fprintf(stderr, " -p Create a pid file with the specified name.\n");
fprintf(stderr,
- " -t Disable state.\n"
- " 'off' for disabling the touchpad entirely, \n"
- " 'tapping' for disabling tapping and scrolling only,\n"
- " 'click-only' for disabling everything but physical clicks.\n");
+ " -t Only disable tapping and scrolling, not mouse movements.\n");
fprintf(stderr,
" -k Ignore modifier keys when monitoring keyboard activity.\n");
fprintf(stderr, " -K Like -k but also ignore Modifier+Key combos.\n");
@@ -551,7 +547,7 @@ main(int argc, char *argv[])
int use_xrecord = 0;
/* Parse command line parameters */
- while ((c = getopt(argc, argv, ":i:m:dp:kKR?v")) != EOF) {
+ while ((c = getopt(argc, argv, "i:m:dtp:kKR?v")) != EOF) {
switch (c) {
case 'i':
idle_time = atof(optarg);
@@ -562,6 +558,9 @@ main(int argc, char *argv[])
case 'd':
background = 1;
break;
+ case 't':
+ disable_state = TappingOff;
+ break;
case 'p':
pid_file = optarg;
break;
@@ -579,24 +578,6 @@ main(int argc, char *argv[])
verbose = 1;
break;
case '?':
- if (optopt != 't')
- usage();
- else {
- if (optind < argc) {
- if (argv[optind][0] == '-')
- disable_state = TappingOff;
- else if (strcmp(argv[optind], "off") == 0)
- disable_state = TouchpadOff;
- else if (strcmp(argv[optind], "tapping") == 0)
- disable_state = TappingOff;
- else if (strcmp(argv[optind], "click-only") == 0)
- disable_state = ClickOnly;
- else
- usage();
- } else
- disable_state = TappingOff;
- }
- break;
default:
usage();
break;