Age | Commit message (Collapse) | Author |
|
Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
All kernel touchpad devices now support slots, there isn't really a need to
support protocol A devices in synaptics. If such devices exist, we just treat
them as non-multitouch devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
When checking the device don't open a new mtdev instance, use the existing
libevdev struct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
The kernel guarantees slots start at 0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
This was supposed to emulate a SYN_REPORT event so that the upper layers
process what's in the queue.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
|
This was originally intended as a fixed xorg.conf option only (and still
largely is seen as such). Secondary software button are required only on a specific series
of touchpads and should be pre-configured by the system and/or the
distribution. As such, the property will not be initialized if it is not set
in the xorg.conf and will thus not respond to runtime changes.
Exposing the property in this way gives clients a chance of detecting if a top
software button area is present and thus adjust their behaviour accordingly.
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>
|
|
leftover from an earlier revision
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
It is possible for a click to get reported before any related touch events
get reported, here is the relevant part of an evemu-record session on a T440s:
E: 3.985585 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
E: 3.997419 0003 0039 -001 # EV_ABS / ABS_MT_TRACKING_ID -1
E: 3.997419 0001 014a 0000 # EV_KEY / BTN_TOUCH 0
E: 3.997419 0003 0018 0000 # EV_ABS / ABS_PRESSURE 0
E: 3.997419 0001 0145 0000 # EV_KEY / BTN_TOOL_FINGER 0
E: 3.997419 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
E: 5.117881 0001 0110 0001 # EV_KEY / BTN_LEFT 1
E: 5.117881 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
E: 5.133422 0003 0039 0187 # EV_ABS / ABS_MT_TRACKING_ID 187
E: 5.133422 0003 0035 3098 # EV_ABS / ABS_MT_POSITION_X 3098
E: 5.133422 0003 0036 3282 # EV_ABS / ABS_MT_POSITION_Y 3282
E: 5.133422 0003 003a 0046 # EV_ABS / ABS_MT_PRESSURE 46
E: 5.133422 0001 014a 0001 # EV_KEY / BTN_TOUCH 1
E: 5.133422 0003 0000 3102 # EV_ABS / ABS_X 3102
E: 5.133422 0003 0001 3282 # EV_ABS / ABS_Y 3282
E: 5.133422 0003 0018 0046 # EV_ABS / ABS_PRESSURE 46
E: 5.133422 0001 0145 0001 # EV_KEY / BTN_TOOL_FINGER 1
E: 5.133422 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
Notice the BTN_LEFT event all by itself!
If this happens, it may lead to the following problem scenario:
-touch the touchpad in its right click area
-let go of the touchpad
-rapidly click in the middle area, so that BTN_LEFT gets reported before the
new coordinates (such as seen in the trace above, this may require some
practicing with evemu-record to reproduce)
-the driver registers the click as a right click because it uses the
old coordinates from the cumulative coordinates to determine the
click location
This commit fixes this by:
1) Resetting the cumulative coordinates not only when no button is pressed,
but also when there is no finger touching the touchpad, so that when
we do get a touch the cumulative coordinates start at the right place
2) Delaying processing the BTN_LEFT down transition if there is no finger
touching the touchpad
This approach has one downside, if we wrongly identify a touchpad as
a clickpad, then the left button won't work unless the user touches the
touchpad while clicking the left button.
If we want we can fix this by doing something like this:
1) Making update_hw_button_state return a delay; and
2) Tracking that we've delayed BTN_LEFT down transition processing; and
3) When we've delayed BTN_LEFT down transition return a small delay value; and
4) If when we're called again we still don't have a finger down, just
treat the click as a BTN_LEFT
But this is not worth the trouble IMHO, the proper thing to do in this
scenario is to fix the mis-identification of the touchpad as a clickpad.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
When a button click and new coordinates get reported in one go we sync the
cumulative coordinates to the old x and y, rather then the newly reported ones.
This keeping of the old coordinates causes the following issue:
-touch the touchpad in its right click area
-let go of the touchpad
-rapidly click in the left click area (or middle area), so that the
new location and the click get reported in one syn (may require some
practicing with evemu-record to reproduce)
-the driver registers the click as a right click because it uses the
old coordinates from the cumulative coordinates to determine the
click location
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This fixes my #1 anoyance with clickpads, where 2 out of 3 clicks turn into
a click + drag unless I hold my finger really really still.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Replaced property with a hardcoded 100ms. This is not something that we should
expose as property, we should find a delay that works best and live with it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Unless the motion has started outside the soft-button area.
Note that we must start reporting motions regardless of whether we think we're
in the button area or not as soon as we've switched to using cumulative
coordinates, since then the coordinates are no longer absolute.
This fixes the reporting of unintended motion just before a click in a soft
button area which sometimes causes mis-clicks.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
We only use it to store button state which we already have in
priv->lastButtons.
While at it also properly indent the code block checking the various
soft button areas.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
While at it also move the enum for the soft button edges out of
is_inside_button_area() so that it can be used elsewhere too.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
If we try to grab the evdev device before we've set the new file
descriptor, libevdev_grab returns -EFAULT, which causes DeviceOn to
fail.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
New generation of laptops with trackstick do not have physical buttons
associated with the trackstick, but instead rely on software buttons at
the top of the clickpad.
Adding a secondary software button area for this purpose.
As we're likely detecting the devices that need it based on udev tags
and MatchTag configuration items, this area doesn't need to be exposed
through properties. So static configuration is fine.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
[couple of man-page additions and rewrites]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
synaptics offers an option to make parts of the touchpad insensitive. This
is ie useful to do palm avoidance rather then palm detection (which may be
unreliable) by disabling an area of 15% on the right and left side of the
touchpad.
Currently a motion which has started inside the active area, stops as soon
as it moves outside of the active area.
If a motion started inside the active area and thus has already generated some
move events, this makes no sense. If the user moves outside of the active
area in this case, this is very likely because the user wants to continue
the motion.
This commit allows such motions to continue normally.
I would like to thank Juerd Waalboer for the basic idea, some coding and lots
of testing for this fix.
Cc: Juerd Waalboer <juerd@tnx.nl>
Reported-by: Juerd Waalboer <juerd@tnx.nl>
Tested-by: Juerd Waalboer <juerd@tnx.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
6d47d33 disallows a zero value for horizontal/vertical scroll deltas but the
man page wasn't updated. We've added separate toggles to enable/disable
scrolling a few years ago, setting the distance to 0 is not recommended.
X.Org Bug 75074 <http://bugs.freedesktop.org/show_bug.cgi?id=75074>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This reverts commit 3b02e7fd81da4b100fb9ac32378f6d50f54cf0e2.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Conflicts:
man/synaptics.man
src/synaptics.c
Acked-by: Daniel Stone <daniel@fooishbar.org>
|
|
This suite was never really maintained anyway, and it is quite hard to do so
anyway. The driver is linked to the server's API too tightly to easily do
independent testing. We need to re-implement stubs for the API the driver
uses, have to track API changes, etc. Not worth the effort.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This reverts commit 0903d99ada1755f11a2a5cbf89a345de896e18ec.
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
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Some touchpads provide BTN_TOOL_TRIPLETAP but do not track more than two
touchpoints. For those, try to detect clickfinger3 actions as best as we can.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9388b54a109bbd634e05611e6c90110d698f13d1)
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
For symmetry, the kernel should ungrab when we close the fd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Always 0 anyway, and the feature was purged in
xf86-input-synaptics-1.6.0-8-g54f65f3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This has a potential bug that would need to be fixed in mtdev first:
if we get a SYN_DROPPED and we miss out on events, the current code emulates a
normal EV_SYN, feeds that to mtdev and hopes that that fills the mtdev output
queue.
If mtdev doesn't generate events on that EV_SYN, we're stuck in limbo and may
get weird results. The loop will continue and sync the device, but there's the
off chance we get odd events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
For absolute devices in relative mode, i.e. touchpads, the server now takes
device resolution into account. Doing so means that the driver mustn't
scale, so we deactivate those bits in the driver.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Allocated in event_query_touch, was never freed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
xf86SetStrOption() returns a strdup'd string that must be freed after use.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
Apple Magic Trackpad can report 16 slots. In clickpad_guess_clickfingers()
the array allocated on the stack contains only 10 slots.
As (.num_mt_mask == .num_slots), the function writes out of the bounds
of close_point.
Use a size 32 bitmask instead and warn if we ever get past 32 touchpoints.
This fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=952221
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
|
For percent-based configuration in the form of
middle button 33%-66%, right button 66%-0 we'd get an error because of the
one device unit overlap. This was neither documented nor useful, because
leaving a 1% gap leaves an actual gap between the buttons. Allow for an
overlap of one device unit on the edge of the buttons.
What's picked in that case depends on the implementation of
is_inside_softbutton_area but since one device unit is so small, it doesn't
matter.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Replace the hardcoded indices with enums that are somewhat expressive.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
man page and help claim we support this, so let's do so
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Removed as of 83d88b253139f9c92d619e7ad7c3981138893536
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Those that use clickpad buttons as buttons can see cursor jumps as the press
on the touchpad - largely caused by the finger changing shape as the
pressure changes and thus moving the hotspot.
Simple fix is to define the clickpad soft button areas as dead areas, but
this cannot be set as general option as it would break for those that use
tapping.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|