summaryrefslogtreecommitdiff
path: root/tools/syndaemon.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-28syndaemon: Remove superfluous message.Peter Hutterer1-1/+0
toggle_touchpad() already prints if we're running verbose. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-28syndaemon: document exit codes and change them to fall into categories.Peter Hutterer1-2/+2
Changing pid file creation failure to same exit code that fork() failure uses. Changing XRECORD init failure to unique code. This way clients can trap exit code 4 and re-start syndaemon without the -R flag. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-26syndaemon: don't compare against a null-property. (#37459)Peter Hutterer1-3/+2
synaptics_property is not set, touchpad_off_prop is the property we need to check against. False check for (nprops != 0) instead of (nprops < 0) would result in syndaemon always reporting a touchpad device, even if none are present. X.Org Bug 37459 <http://bugs.freedesktop.org/show_bug.cgi?id=37459> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-26syndaemon: add vim snippet for right indentation/tabstop, etc.Peter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-26syndaemon: fix abysimal indentation in dp_get_device.Peter Hutterer1-13/+13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-18Drain XRecord connection of any events after handling repliesChase Douglas1-0/+8
If the X server sends an event to the XRecord connection the event will never be handled. This will cause the event queue to fill up in Xlib and lead to syndaemon running away at 100% cpu usage. This change drains any events from the connection. It's not a fix for the underlying bug in the server or Xlib, but it does paper over the issue for now. https://bugs.launchpad.net/bugs/754470 http://bugs.freedesktop.org/show_bug.cgi?id=31921 Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-17syndaemon: reset idle time if the system time has changed (#31968)Peter Hutterer1-0/+5
If the system time is changed backwards while the touchpad is disabled through syndaemon it remains disabled until the time catches up with the previous idle time again. Avoid this by resetting last_activity with a time that will trigger re-enabling of the device. X.Org Bug 31968 <http://bugs.freedesktop.org/show_bug.cgi?id=31968> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-17syndaemon.c: Add #include <string.h>Alan Coopersmith1-0/+1
Solaris FD_ZERO is defined using memset, but <sys/select.h> doesn't include <string.h> itself, leading to compiler warning: "syndaemon.c", line 404: warning: implicit function declaration: memset Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-06syndaemon: decouple background mode from quietnessAlessandro Guido1-5/+10
syndaemon currently outputs lots of stuff when not running in background mode. However, current init daemons and session managers can manage to launch the daemon in background without "-b" just fine (if not better), by doing the fork() themselves. Indeed, if one uses that setup, ie. by having syndaemon launched by GNOME at login, it gets the ~/.xsession-errors file spammed by Enable/Disabled messages. This patch fixes this by introducing a new verbose (-v) flag that enables those messages and makes syndaemon quiet by default. Signed-off-by: Alessandro Guido <ag@alessandroguido.name> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-31config: rework the synclient and syndaemon dependenciesGaetan Nadon1-6/+6
The driver does not require inputproto package The hunting for record.h is done only if libXtst is installed AC_CHECK_HEADERS is used rather than checking for package versions HAVE_PROPERTIES is no longer required Normal config output: checking for XI... yes checking for XTST... yes checking for X11/extensions/record.h... yes Permutations of --enable-tools and dependencies: build_tools libXi installed Result ----------- --------------- --------- yes yes build tools auto yes build tools no yes skip build yes no abort configuration auto no warn and skip build no no warn and skip build Permutations of libXtst, record.h and recordproto libXtst record.h recordproto syndaemon installed installed installed using XRecord? yes yes yes yes yes no yes no no no yes no no yes yes no no no no no Other scenarios are possible where you have 2 different versions of record.h installed in different $prefix locations. The order of *_CFLAGS will determine which one gets picked first. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-01-07Restore user's setting when enabling touchpad.Hiroyuki Ikezoe1-20/+41
And do not disable if the property is already disabled. Signed-off-by: Hiroyuki Ikezoe <poincare@ikezoe.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-26syndaemon: remove SHM code - properties only from now on.Peter Hutterer1-71/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-23Don't fail when building against server 1.5Peter Hutterer1-1/+11
The driver had all the right guards, but synclient and syndaemon didn't. Check for xserver 1.6 and higher and disable property support in synclient and syndaemon. Note that the property headers still get installed even without support for properties in the driver. This ensures that apps looking for synaptics >= thisversion don't fail miserably. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Christoph Brill <egore@gmx.de>
2009-03-04syndaemon: disable XRecord by default.Peter Hutterer1-3/+3
XRecord is disabled in the server by default, so let's not have it as default here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Julien Cristau <jcristau@debian.org>
2009-03-04syndaemon: use device properties unless SHM is requested.Peter Hutterer1-5/+88
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Julien Cristau <jcristau@debian.org>
2009-03-04syndaemon: if we wanted XRECORD, but it failed, exit.Peter Hutterer1-2/+9
If Xrecord is missing but we requested it (say, didn't disable it explicitly), then exit. Don't use the alternative SHM area, it's bad for your health. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Julien Cristau <jcristau@debian.org>
2009-03-04syndaemon: move shm code into shm_init().Peter Hutterer1-14/+23
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Julien Cristau <jcristau@debian.org>
2009-03-04syndaemon: remove enable/disable_touchpad(), use toggle_touchpad insteadPeter Hutterer1-31/+31
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Julien Cristau <jcristau@debian.org>
2009-03-02syndaemon: fix minor typo in --help output.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-12use Xrecord extension for event triggered key event notificationAndre Herms1-8/+212
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Christoph Brill <egore911@egore911.de> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2008-10-30Revert "[syndaemon] use Xrecord extension in syndaemon to avoid polling."Christoph Brill1-211/+9
This reverts commit 641b26da531b38313ecc68badac1a3ccfd6fc7af. As requested by Peter Hutterer and Henrik Rydberg.
2008-10-30Revert "[syndaemon] switch over to input properties"Christoph Brill1-196/+32
This reverts commit 934bc0012f948c52aadc8eda912f7728fb7394a2. As requested by Peter Hutterer.
2008-10-16[syndaemon] switch over to input propertiesWilliam Grant1-32/+196
This patch switches the daemon to use input properties. One can still use the SHMConfig as fallback. Signed-off-by: Christoph Brill <egore911@egore911.de>
2008-10-16[syndaemon] use Xrecord extension in syndaemon to avoid polling.Andre Herms1-9/+211
This patch prevents the polling of the keyboard state. Instead it uses the XRecord extension of the Xserver for an event triggered notification of key events. Of course, there is a fallback to the polling when no XRecord extension is found. This should finally stop complains of syndaemon preventing good power saving. Signed-off-by: Christoph Brill <egore911@egore911.de>
2008-10-09[sparse] Fix warnings about non-ANSI function declarationsMagnus Kessler1-5/+5
Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Christoph Brill <egore911@egore911.de>
2008-10-09[sparse] Fix warnings about using plain integer as NULL pointerMagnus Kessler1-1/+1
Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Christoph Brill <egore911@egore911.de>
2008-09-05syndaemon: fix BSD-specific build issues (signal related)Matthieu Herrb1-1/+8
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-07-23Move synclient and syndaemon into a /tools/ directory.Peter Hutterer1-0/+336
Let's keep the driver source and the client program source separate.