Commit Graph

59 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
8bfd4dcbd8 drop obsolete #ifdef HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 19:06:58 +01:00
Alan Coopersmith
42ac30568e Accept --help & --version as aliases to -? & -V
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics/-/merge_requests/25>
2025-04-28 13:11:15 -07:00
Alan Coopersmith
46d0532962 Handle a -Wstrict-prototypes/-Wold-style-definition pair of warnings
synclient.c:196:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  196 | dp_init()
      | ^~~~~~~
synclient.c: In function ‘dp_init’:
synclient.c:196:1: warning: old-style function definition [-Wold-style-definition]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-05 17:10:41 -08:00
Alan Coopersmith
f52912d062 Fix 185 -Wdiscarded-qualifiers warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-05 17:01:50 -08:00
Pip Cet
3e4bc35dfe synclient: allow negative/large values for AreaLeftEdge etc. 2021-04-09 16:58:38 +00:00
Gabriele Mazzotta
383355fa5f Remove FastTap leftovers
FastTap was removed with d14ea867ad ("Purge fast-taps option"),
remove all of what remained.

Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-12 11:08:56 +10:00
Peter Hutterer
17bbcad280 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 eea7335876.

Conflicts:
	man/synaptics.man
	src/synaptics.c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12 14:13:18 +10:00
Peter Hutterer
eea7335876 Add another third state to TouchpadOff for disabling all but button clicks
On a new set of laptops like the Lenovo T440 the trackstick does not have
physical buttons. Instead, the touchpad's top edge is supposed to acts
software button area. To avoid spurious cursor jumps when the trackstick is in
use and the finger is resting on the touchpad, add another mode that disables
motion events.

Enabled by syndaemon with -t click-only, the default stays unchanged. No
specific integration with the traditional disable-while-typing is needed. On
such touchpads, disabling motion events is sufficient to avoid spurious
events and we don't want to stop HW buttons to send events.

Note that this only adds the new state to the driver and to syndaemon, there
is nothing hooked up otherwise to actually monitor the trackstick.

Special note for syndaemon: optional arguments are a GNU extension, so work
around it by messing with an optstring starting with ":" which allows us to
manually parse the options.

Original version of this patch by John Pham <jhnphm@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-24 08:25:29 +10:00
Peter Hutterer
4f543ce1d6 Revert "Drop circular pad support"
This reverts commit 3b02e7fd81.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

Conflicts:
	man/synaptics.man
	src/synaptics.c

Acked-by: Daniel Stone <daniel@fooishbar.org>
2014-02-18 07:51:47 +10:00
Peter Hutterer
e0069c1544 Revert "Purge scrollbuttons (repeat)"
This reverts commit 0903d99ada.

Scroll buttons are still present in some modern devices, e.g. the Fujitsu
Lifebook E782 and others in the series.

Conflicts:
	include/synaptics.h
	man/synaptics.man
	src/synaptics.c
2014-01-17 08:24:35 +10:00
Peter Hutterer
eb5f086f29 synclient: support -? for usage
man page and help claim we support this, so let's do so

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-26 15:18:03 +10:00
Peter Hutterer
d059005287 synclient: remove 'm' and 'h' from getopt and man page
Removed as of 83d88b2531

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-26 15:16:19 +10:00
Peter Hutterer
d771cf75b1 tools: drop -s listing in synclient's help output. SHM is gone.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-26 15:12:54 +10:00
Peter Hutterer
0352c67fa2 tools: coasting speed is not capped at 20, cap it at 255
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-11 10:57:49 +10:00
Peter Hutterer
ebd36c7494 Move synaptics.h leftovers to synapticsstr.h, drop synaptics.h
This leaves us with a duplicated define for the maxbuttons but I'll live
with that for now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10 10:06:25 +10:00
Peter Hutterer
3b02e7fd81 Drop circular pad support
Do such devices still exist?

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10 09:42:43 +10:00
Peter Hutterer
0903d99ada Purge scrollbuttons (repeat)
I doubt devices that have scrollbuttons are still manufactured. Having
untested code around is just asking for trouble.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10 09:42:36 +10:00
Peter Hutterer
54f65f3ca1 Purge edge motion
A funny feature, but unreliable and mostly untested.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10 09:42:30 +10:00
Peter Hutterer
2c7eab5a6d Drop trackstick emulation mode
"Trackstick emulation mode? That exists?" I hear you say? Yes, indeed. Well,
no, not anymore. This driver is already unmaintainable without features like
this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10 09:42:23 +10:00
Peter Hutterer
83d88b2531 Bury shm - or what was left of it
SHM configuration was removed in Apr 2009 (c09a3d50e9), since then it has
only been usedful for debugging. And we have better tools (evtest) for
debugging hardware events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10 09:42:19 +10:00
Peter Hutterer
d1eebac72e tools: undo indentation in synclient's parameter list
more more readable this way

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10 09:21:14 +10:00
Peter Hutterer
0434d77766 Indent consistently
x-indent-all.sh from xorg/util/modular as of
c2d630fab65dbe3409af3947f6f442782ddb026f

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10 09:21:10 +10:00
Alyssa Hung
1874094f0e Support inverted scroll direction.
This patch allows scroll direction to be inverted by allowing
VertScrollDelta and HorizScrollDelta to be set to negative values. This
enables behaviour that is consistent with modern touchscreen devices,
where the content scrolls in the same direction as the user's finger
movement.

Signed-off-by: Alyssa Hung <ahung@isisview.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-16 11:44:14 +10:00
Peter Hutterer
c745604461 tools: skip non-existing properties
If a property doesn't exist on a device, skip it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-04-11 11:10:06 +10:00
Chase Douglas
405f1643e2 Add soft button areas property
Some clickpad devices have button areas painted on them. Set this
property to the area of the right and middle buttons to enable proper
click actions when clicking in the areas.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-14 08:47:05 +10:00
Chase Douglas
331dd96953 Add clickpad device property
Add it as a writable device property. We may not know how to probe some
clickpads so allow the user to override it.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-14 08:46:54 +10:00
Peter Hutterer
7f5bd79b2e tools: add hysteresis support to synclient
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-03-13 16:18:31 +10:00
Peter Hutterer
dfc3a8ed71 synclient: accept XA_CARDINAL as 32-bit type (#46330)
PressureMotionMaxZ and PressureMotionMinZ were changed from float to
XA_CARDINAL in 24c44375025576dd600ccf370ba365e5d94dc22. Accept the new type.

Fixes:
  PressureMotionMinZ      = format mismatch (32)
  PressureMotionMaxZ      = format mismatch (32)

X.Org Bug 46330 <http://bugs.freedesktop.org/show_bug.cgi?id=46330>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-21 11:42:27 +10:00
Peter Hutterer
53adb8399d synclient: fix indentation of "format mismatch" parameters
Prefix is 4 spaces, not three.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-04 23:44:09 +10:00
Peter Hutterer
513d40f7c4 tools: don't include xserver-properties.h
Remove the header inclusion to avoid dependency of synclient on the xserver
headers. The only property we need from the server is FLOAT and we can
simply define that here.

Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-11 08:00:20 -04:00
Peter Hutterer
4ebde557ae Revert "Add synaptics orientation support"
This patch needs more work before we can ship it.

This reverts commit 049d5fb603.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:25:02 +10:00
Aapo Rantalainen
049d5fb603 Add synaptics orientation support
This patch allows usage of "synclient Orientation=0" (values from 0 to
3). It will rotate the touchpad similar to "xrandr -o". Original patch
was extended for alps and ps2.

Signed-off-by: Christoph Brill <egore911@egore911.de>
2011-03-09 22:27:04 +01:00
Alan Coopersmith
5c98205e02 synclient.c: Replace old index() function with C89-standard strchr()
Fixes Solaris compiler warnings of:
"synclient.c", line 152: warning: implicit function declaration: index
"synclient.c", line 152: warning: improper pointer/integer combination: op "="

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-17 07:25:43 +10:00
Patrick Curran
56655fd15f Added "friction physics" so coasting can stop on its own.
When you are coasting (but not corner coasting) you might want the
scrolling to slow down and stop on its own.  This also lets you
start coasting while using a two finger scroll.

Signed-off-by: Patrick Curran <pjcurran@wisc.edu>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-20 11:08:47 +10:00
Peter Hutterer
7acdbb7cf9 synclient: don't print "missing" if a property doesn't exist.
Virtually all touchpads still in use have one or more properties missing
anyway. If it's not in the list, then it's missing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-17 11:34:32 +10:00
Peter Hutterer
b19e3782a7 Purge GuestMouse support.
Guest mouse dates back to quite a while ago, hasn't been tested for ages and
the current synaptics interface guide claims the bit that we used to check
if guestmouse is available is "reserved for future use. The host should
ignore the values of reserved bits when reading the capability bits."

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-17 11:23:30 +10:00
Peter Hutterer
bef44f0160 synclient: allow Min|MaxSpeed values of > 1.0.
With the new accel mechanisms, the old ranges don't apply anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-17 11:13:51 +10:00
Peter Hutterer
8b1446f798 synclient: if no option is specified, assume -l
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Adam Jackson <ajax@redhat.com>
2009-11-05 08:51:29 +10:00
Alberto Milone
7179a0eb11 Add active area outside of which movements, scrolling, tapping are ignored.
On some touchpads physical buttons are located under the touchpad surface. As a
result, when users try to perform a click, by pressing that part of the surface
of the touchpad, they get a click, a movement, a tap and (in some cases) a scroll,
which can make clicks quite inaccurate.

The "Synaptics Area" property can be used to define the edges of the active area of
the touchpad so that all movement, scrolling and tapping which take place outside
of this area will be ignored. This property is disabled by default.

Fixes xorg bug #21613.

Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-17 10:42:31 +10:00
Peter Hutterer
35191ec094 synclient: up max value for AccelFactor to 1.0
There's no real reason to restrict AccelFactor to 0.2, the driver itself
doesn't restrict AccelFactor either. Upwards of 1.0 it's hard to spot any
real differences in speed though, so 1.0 seems like a sensible maximum.

Red Hat Bug 462574 <https://bugzilla.redhat.com/show_bug.cgi?id=462574>

Reported-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2009-05-19 08:25:32 +10:00
Erkin Bahceci
ee265e10c9 Add TapAndDragGesture option and gestures property.
The tap-and-drag gesture is an alternative way of dragging.
It is performed by tapping (touching and releasing the finger), then
touching again and moving the finger on the touchpad.
This gesture is enabled by default and can be disabled by setting the
TapAndDragGesture option to false.

The gesture already existed in synaptics and was always enabled. This
commit adds an option to switch it on/off. The default behavior is
tap-and-drag being enabled, that is, TapAndDragGesture is true.

The "Synaptics Gestures" property is intended to hold all new gesture
enabling options, like options for the upcoming multitouch gestures.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-13 09:03:46 +10:00
Peter Hutterer
609b6728ef Purge SynapticsHWInfo stuff, move it into proto_data.
This was only used in PS/2, on linux only on kernel 2.4 and it clobbered up
the rest. Move it to the ps2comm parts only, keep it private there.
This includes adding a "proto_data" field to the SynapticsPrivate.

This patch removes the -h option for synclient.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Christoph Brill <egore911@egore911.de>
2009-05-08 14:17:36 +10:00
Peter Hutterer
4f58454f53 synclient: fix 64 bit issues for float properties.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2009-04-27 08:56:10 +10:00
Peter Hutterer
f2c85fe950 synclient: remove listing and modification of settings through SHM.
SHM is only used for dumping and monitoring hardware state.
synclient now requires property support (i.e. server 1.6).
2009-04-26 21:00:53 +10:00
Peter Hutterer
74bd8574c7 synclient: fix 32-bit integer handling on 64 bit machines.
libX11 actually expects longs for 32-bit values, even if they are 64 bits.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2009-04-15 08:23:21 +10:00
Peter Hutterer
a07a840b26 Don't fail when building against server 1.5
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-23 16:45:48 +10:00
Peter Hutterer
07f0588bbd synclient: don't print driver's package version info.
synclient is not the driver. If you want to know the driver's version, look in
the log file. After all, synclient would only print the one it was compiled
with anyway, not the one of the driver.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-04 15:04:44 +10:00
Peter Hutterer
aa5b2b64e5 synclient: XCloseDisplay doesn't like NULL-pointers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-04 11:52:07 +10:00
Peter Hutterer
b768d6e1f5 synclient: print an error if we can't find the synaptics device.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-01 08:41:22 +10:00
Peter Hutterer
65919aae57 synclient: define XATOM_FLOAT if missing from xserver-properties.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-27 12:05:35 +10:00