Age | Commit message (Collapse) | Author |
|
mtdev_close_delete() is to mtdev_new_open() as mtdev_close() is to
mtdev_open(). So, since we're using mtdev_new_open(), we need to use
mtdev_close_delete() instead of just mtdev_close() to actually free
everything.
Fixes an eventual failure to open the touchpad device after a lot of
suspend/resume cycles.
[whot: amended to mtdev_close_delete in evdev_query_touch]
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
On clickpads, a dead area helps prevent pointer movement when the buttons
are pressed. Thus check for the button state before resetting the hw state
in case we get a right-click in the soft button area.
For clickfinger, the effect is that clickfinger events are now triggered if
the finger rests in the dead area.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Otherwise the driver has no internal reference to the soft button area
property and will ignore any setting.
Also, if a client sets this property, we claim it as our own and disallow
deletion.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The tests don't need this symbol anymore.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
When disabling the device, reset num_active_touches to zero. Otherwise,
num_active_touches stays at the value it was on DeviceOff(). Future touches
add to that value until the index may go past priv->open_slots[].
That causes spurious memory corruption on touch ends.
And as of 55fc42e7c9b4948cadd4f98ef7b6a3b12e268e3e we ignore pre-existing
touches anyway.
Test-case:
- place num_touches fingers on the touchpad
- xinput disable <device>
- lift fingers
- xinput enable <device>
- place finger on device, num_active_touches is now (num_touches + 1)
X.Org Bug 52496 <http://bugs.freedesktop.org/show_bug.cgi?id=52496>
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 MinSpeed message already does so, do it for MaxSpeed and AccelFactor
too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
We allocate it just a few lines north of here, and already dereferenced it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
As of 3f9794a8a0f019a4b153941c9ec1927c7797ce6f, slot_index is always >= 0
when we get to either of these conditions.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
The touchpads are too sensitive by default. A touch is activated when a
finger hovers a millimeter off the device. This change turns down the
default sensitivity so that accidental touchpad interactions are
lessened and pointer interaction accuracy is increased.
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>
|
|
Initially, treat them the same as MODEL_APPLETOUCH devices, as that is
what they were recognized as before.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
And switch a few current DBG messages to PS2DBG to have one ps/2 debugging
output command.
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 real effect, just for correctness. Plus, move the include directive up to
be the first include.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Long-term, structs will be structs without typedef. This one is the easiest
one to convert, the rest follows later.
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>
|
|
We currently mix non-typedef'd and typedef'd enums in the code. Stop this
mixing, remove typedefs to make the code more obvious.
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, just making things more obvious.
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>
|
|
Moving a touchpad in absolute mode is unusual - touchpads are disconnected
from the output device, so direct interaction is hard. There appears to be
little usage of it (I haven't seen bug reports from people claiming to use
it). Joe Shaw, author of the code and only known user doesn't have a use for
it anymore, so purge it from the repo.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
It'll either hang the server or blow up with divisions by 0, whichever one
comes first.
X.Org Bug 49965 <http://bugs.freedesktop.org/show_bug.cgi?id=49965>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
The driver assumes x/y is always valid but after coming from a resume we may
get a few events with either ABS_X or ABS_Y (not both). Thus we process with
hw->x == 0 and hw->y == somevalue, causing cursor jumps when calculating
deltas whenver the real hw->x comes in.
Fix this by resetting hw->x/y to INT_MIN and skip state processing until
both axes are available.
For clickpads, this means handling of data will be delayed until we get
at least one motion on each axis. Button presses won't be recognised either
until that happens. It requires some skill to not trigger motion on both
axes, even more to press a button without doing so.
For non-clickpads, handling of motion events will be delayed likewise. If a
physical button is pressed immediately after resume we have to assume deltas
of x/y.
- If the next event is a new touch, it will have ABS_X/ABS_Y set anyway
- If the finger was already down, a button event is generated, and the
finger has generated ABS_X or ABS_Y only before the event, the next event
containing the missing data will cause a jump. The fix for this is more
invasive and this is quite a corner-case.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
The open slots array is used for clickpad cumulative delta computation.
If the array is not reset and becomes corrupted during the device
disable/enable cycle, the cumulative deltas may be wrong. This manifests
as jumpy cursor behavior on some clickpads after suspend/resume.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Fix the coasting direction for when VertScrollDelta or HorizScrollDelta is
negative.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=49966
Regression introduced in 0de4445ff8e75aab208faf6383e76045934c6720
Signed-off-by: Chun Yang <Chuck.Yang@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Seems like this was a rebase gone wrong, HAVE_MULTITOUCH was removed in
3430f4af41184752d698dcbf4919469e36b3216c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If a touch is physically active when the device is enabled, then all
events for that touch must be ignored. In particular, we cannot close
the touch or we will decrement touch count counters below zero. If these
counters go below zero memory corruption can occur.
Note that a device is disabled and enabled every time the user types on
the keyboard if synclient is used to disable the trackpad while typing.
This is a very common option.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If a touch is active during driver init, the slot will be set to
SLOTSTATE_CLOSE when it finishes. That could decrease num_active_touches to
less than 0, causing out-of-bounds access.
X.Org Bug 49439 <http://bugs.freedesktop.org/show_bug.cgi?id=49439>
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>
|
|
CoastingSpeed is defined as scrolls/s. The previous code just used
delta/seconds which depended on the device coordinate range and exceeded the
default CoastingSpeed at almost any scroll event.
Divide the estimated delta by the scroll distance to get the accurate
scrolls/s number. Since that now changes the contents of what's in
coast_speed_y, change the users of that too.
http://bugzilla.redhat.com/813686
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Moving into a different soft button's area during drag-n-drop would trigger
a click of that button.
We only have the current button state and we mess with it, so the conditions
for a possible clickpad soft-button event are:
- hw->left is down now
- none of left|right|middle were down before. since we change hw->left to
hw->right/left we need to check all three
If hw->left is down but one of the other buttons was already down, copy that
button state and continue.
http://bugzilla.redhat.com/819348
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Original version of d13e83b921a398b9472b07874cf5061c8a0ea6a6 had
'force_empty', the rename only covered the definition, not the declaration
of the function.
No functional changes.
Reported-by: Nicola Soranzo <nsoranzo@tiscali.it>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The driver name doesn't change often enough for this to warrant it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
|
|
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>
|
|
This drops conditional compilation of multitouch support, smooth scrolling
support and old ABIs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Do such devices still exist?
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
|
|
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>
|
|
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>
|
|
This driver has too many options, maintaining them is hard and testing
virtually doesn't happen.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
|
|
"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>
|
|
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>
|
|
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>
|
|
more more readable this way
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
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>
|