Age | Commit message (Collapse) | Author |
|
1874094f0e99d8db319f6cf769ce5a25c9bc490c introduced negative scroll
directions. Coasting assumed always-positive increments and triggered an
endless scrolling loop.
Reported-by: Matthias Clasen <mclasen@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
SLOTSTATE_OPEN_EMPTY on resume leads to erroneously detected touches.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Reset all state on DeviceOff to avoid stuck buttons on resume.
X.Org Bug 49161 <http://bugs.freedesktop.org/show_bug.cgi?id=49161>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Provides for a more consistent scrolling experience, otherwise delta
leftovers may trigger extra events even when the actual scrolling action
stays the same.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Regression introduced in cddab79c408db3b13905a2be72aff4f7bf1406f8.
If an event has a delta of less than scroll_dist_vert, the delta is
unconditionally divided by the distance, leaving some remainder close to 0
and never actually triggering the scroll amount.
Fix this by working with the increment, not the normalised values.
X.Org Bug 46617 <http://bugs.freedesktop.org/show_bug.cgi?id=46617>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Don't leave touches lingering around during suspend.
Test case:
1) leave finger on touchpad
2) xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0
3) lift fingers
4) xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1
X.Org Bug 49161 <http://bugs.freedesktop.org/show_bug.cgi?id=49161>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
TS_3 is second tap down. Unconditionally set the button as down, later, in
HandleTapProcessing we have the required conditions to reset it to TS_START
and TBS_BUTTON_UP.
Meanwhile, TBS_BUTTON_DOWN stays down, so the second tap is counted and sent
as button event. This restores double-tapping if TapAndDrag is disabled.
X.Org Bug 31854 <http://bugs.freedesktop.org/show_bug.cgi?id=31854>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The eventcomm backend takes the timestamp from the kernel, but the timer
uses the timer's "now". This timestamp may be later than the one from the
next event we read from the kernel, causing a negative dtime in get_delta()
and a cursor jump by (unsigned int)-1.
Ensure that the new event's timestamp is at least the last used one.
X.Org Bug 48777 <http://bugs.freedesktop.org/show_bug.cgi?id=48777>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Gavin Troy <gavtroy@gmail.com>
|
|
As a result of commit 5a1612d4496b51682c9043aa064025c545249de6, coasting speed
was bumped up to a different scale by removing the divisor during the
calculation of initial coasting speed. This caused coasting friction to have
little to no effect, resulting in coasting that lasted virtually forever using
the default coasting friction value of 50.
This patch multiplies the scroll_dist_{horiz,vert} which was previously used as
a divisor for initial coasting speed to the coasting friction before deducting
it at each step, thus bringing coasting friction back under control.
Signed-off-by: Chow Loong Jin <hyperair@debian.org>
Tested-by: <Magnus.Kessler@gmx.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
There is currently a problem that can lead the coasting to continue while scrolling in a particular situation :
with
Option "VertTwoFingerScroll" "on"
Option "CornerCoasting" "0"
Option "CoastingSpeed" "10"
Option "CoastingFriction" "50"
Option "CornerCoasting" "0"
If you scroll down with two finger then raise a finger, coasting will start. But if you put down that finger and try to
scroll up, the inertia will still scroll down while you scroll up. This can look like a very particular situation, but
happens to me often while scrolling in a big document.
This (awfully simple) patch stop coasting when detecting two-finger scroll.
Signed-off-by: Pierre Lulé <pierre@lule.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
Fixes a bug introduced in commit 2603ad69b997c999404ecc441e0d64ea2cc22018
(Use the scroll distances as increment for scrolling valuator axes)
Since this commit, scroll distance was set with SetScrollValuator function
but it was still used as a divisor to calculate coasting,
thus making coasting too slow. (at least on my computer)
Deleting the divisor fixes the issue.
A report of the same bug : https://bugs.archlinux.org/task/28955
Signed-off-by: Pierre Lulé <pierre@lule.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
A finger may be closer than the required distance to more than one finger.
e.g. for fingers A, B, C, AB, AC and BC may trigger the check and count
C twice -resulting in a 4 finger click.
Avoid double-counting by marking those fingers already close enough to a
previous finger to avoid overcounting.
X.Org Bug 48316 <http://bugs.freedesktop.org/show_bug.cgi?id=48316>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Though this looks like a behavior change, it really isn't since the
maximum tap_max_fingers that was previously possible was already handled.
The only real change is that if a tap is recognized but the
tap_max_fingers is zero, a tap will no longer be emitted. This shouldn't
happen in the real world.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This way the option is reported in the log when parsed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
On a clickpad, when the button is pressed the clickfinger guessing will
only work properly if all touches have new data to report. If a touch
has not changed, then it will not be counted. This leads to inaccurate
finger counts.
This change ensures that all active touches are counted. Note that the X
and Y valuators of active but unchanged touches are still valid.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The "old" logical state now holds the clickfinger action button. In
order to check for proper clickpad press transition, we need to check if
any of the left, middle, and right logical button states are pressed.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
When MBE is enabled, a physical left button press is delayed until a
timeout is reached. This results in the logical left button being
depressed while the physical left button is pressed. The physical state
is stored as the "old" hw state, and it is used for detecting a
transition from depressed to pressed for clickfinger actions. Since the
"old" hw state shows the left button pressed, but the current logical
state shows the left button unpressed, when the MBE timeout fires and we
set the logical left button pressed the transition check fails.
Since the "old" hw state is only used for clickfinger left button press
transitions, redefining it to hold the previous logical hw state is
sufficient for fixing the bug and should not cause any regressions.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Introduced in 26831a6eeac6762ad4d99532f62ebbab0827de10.
In said commit, the old-style button events were changed to delta
accumulation. Alas, for circular scrolling, a positive delta is up whereas
for everything else a positive delta is down.
Reported-by: Thomas Bächler <thomas@archlinux.org>
Tested-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
If the clickpad support is runtime enabled/disabled, the property
appears/disappears accordingly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Semi-mt devices do not track touches. The locations of touches are
unknown, we only have the bounding box of two of them. When the number of
fingers changes, the bounding box coordinates may change as well, but
the cumulative relative motion updates at that instant are invalid.
To work around this, ignore changes in cumulative relative motion if the
touch count changes.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
Previously, all touch data from semi-mt devices was ignored because the
X server doesn't support them. However, the touch data must be used for
proper clickpad handling.
Instead of ignoring semi-mt device touch events, mark the device as
being semi-mt and allow initialization of the touch state. The touches
will then be used in calculating the cumulative_d{x,y} values that are
needed for clickpad support.
When handling the touch data for X event processing, simply skip over
reporting the touches.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
There really isn't a point to scrolling while a clickpad is pressed. In
particular, the clickpad button areas and the horizontal edge scrolling
areas overlap, so horizontal edge scrolling must be disabled. Also,
performing two finger scrolling while a third finger presses the button
would require us to inhibit touch events until four touches are present.
That is enough reason to disable two finger scrolling as well.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Use cumulative relative touch motion when the clickpad is pressed. If
more than one touch is active, assume one of the touches is designated
solely for pressing the clickpad button. Thus, decrement the number of
reported touches.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The actual distance should be done in cm, based on touchpad resolution etc.
That is left as an exercise for the reader.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Because, well, really, how?
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
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>
|
|
And when copying the hardware state, don't copy those buttons that were set
through emulation.
This is a temporary fix only, we should add new fields to the hw struct that
represent the various features as they are enabled/disabled and then treat
them accordingly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
ClickFingers doesn't need to be handled on every state, only when the actual
button state changes.
This is a break from the previous behaviour which allowed pressing the
button followed by a two-finger tap to trigger the ClickFinger2 action.
Let's see if anyone complains.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
No functional changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
No functional changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
The results depend on the data rate of the device. A device with a
higher data rate, and thus lower individual deltas, will behave
differently with the regression calculation.
This can be verified on Synaptics semi-mt clickpads. The data rate is
halved when two or more touches are on the device. When trying to press
a button and drag the cursor with another touch, the motion will feel
faster than dragging with only one touch on the device.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
No effect as both have the same value anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
All Elantech touchpads report the number of fingers explicitly,
and at least the v3 version of the hardware can report any
pressure values down to zero. This interferes with the tap
detection hysteresis, which is required for dumb touchpads.
This commit implements a vendor-specific workaround for Elantech
touchpads which sets the FingerLow and FingerHigh options to 1
by default, effectively disabling the hysteresis mechanism.
Signed-off-by: Peter Zotov <whitequark@whitequark.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Introduced in 2603ad69b997c999404ecc441e0d64ea2cc22018. Previously, the
delta was incremented by (actual delta/scroll dist), button clicks where
then sent while (delta-- >= 1).
After 2603ad69b997c999404ecc441e0d64ea2cc22018, the delta was incremented by
the delta only, scroll dist was used as increment in the smooth scrolling
information. On non-smooth-scrolling servers, the driver would now send
too many events. Restore the old behaviour by dividing by the scroll
distance before entering the button click loop.
X.Org Bug 46617 <http://bugs.freedesktop.org/show_bug.cgi?id=46617>
Tested-by: Peter Zotov <whitequark@whitequark.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If the device is turned off, usually by syndaemon to disable the
touchpad while the typing, the touch state will not be updated with the
latest hardware state changes. If a touch begins while the device is
off and ends while the device is on, then the touch count will be
decremented without any previous increment. A similar effect will occur
if the device is on when the touch begins, but off when the touch ends.
If the touch count goes negative, the index into the touch slot mask
array will be out of bounds. This can corrupt memory and cause random
crashes.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This commit introduced a regression. On some touchpads, the pointer keeps
moving in the last direction when the finger movement stops but the finger
is left on the touchpad.
Cause appears to be get_delta() which calculates the deltas based on the
motion history but has no control flow for the lack of fake motion events
in the history after this commit. Thus, under some conditions, the delta is
always non-zero as the history does not change.
Reproducer attached to bug
https://bugs.freedesktop.org/show_bug.cgi?id=45278#c11
X.Org Bug 45278 <http://bugs.freedesktop.org/show_bug.cgi?id=45278>
This reverts commit c8b098214b44cf0585d78c460401ea7d143769f3.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
|
|
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Initialize touch stuff in a separate function for readability.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|