summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-05-13synaptics 1.6.4xf86-input-synaptics-1.6.4Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-26Fix stack smash in clickpad_guess_clickfingers()Peter Hutterer
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> Conflicts: src/synaptics.c
2013-02-01synaptics 1.6.3xf86-input-synaptics-1.6.3synaptics-1.6-branchPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-01conf: add example for AreaBottomEdge on clickpad buttonsPeter Hutterer
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> (cherry picked from commit 2159b5d26207c83efea6efca7fa5765df95a4219)
2013-01-17synaptics 1.6.2.901xf86-input-synaptics-1.6.2.901Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-17Recognise the soft button area property before clickpad is enabledPeter Hutterer
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> (cherry picked from commit 86460318ba5606ef41712b52e50bf7b2ba083226)
2013-01-17Free mtdev device as well as closing itDaniel Stone
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> (cherry picked from commit ce7565ea6683f594f1f2ab5769bf60b1337d70bd)
2013-01-17Use LogMessageVerbSigSafe on ABI 18Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> (cherry picked from commit e28575b29b394b38f1d92b75353fc0fe82838b7c)
2013-01-17test: drop xf86CheckStrOption from fake symbolsPeter Hutterer
The tests don't need this symbol anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 3cb14dcccf5574366d90e24f351e3ad04b35e35f) Conflicts: test/fake-symbols.c test/fake-symbols.h
2012-12-21Allow dead areas to update the button statePeter Hutterer
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> (cherry picked from commit a5ac54f60af96b9b862425ccd8b6c7afaa4937e4) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Conflicts: src/synaptics.c
2012-08-31Reset num_active_touches on DeviceOff (#52496)Peter Hutterer
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> (cherry picked from commit a245d42f53096b1ae81e6702729f97ca508e5b5b) Conflicts: src/synaptics.c
2012-06-12synaptics 1.6.2xf86-input-synaptics-1.6.2Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-18synaptics 1.6.1.901Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-18Don't allow for scroll distances of 0 (#49965)Peter Hutterer
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> (cherry picked from commit 6d47d334d8a876e7e094306c313246b87016b78a)
2012-05-18Reset hw->x/y to INT_MIN and skip HandleState until we have x/y eventsPeter Hutterer
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> (cherry picked from commit cd569377cda9b5a4ee00c0137db14f625c76c40f)
2012-05-17Reset open slots array on device disableChase Douglas
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> (cherry picked from commit 0054b144f3daf00e46a35b2f165befb209df94fc)
2012-05-16Fix coasting for negative ScrollDeltaChun Yang
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> (cherry picked from commit 53557a5cab1e253dc8f4393207954ae0fe76068f)
2012-05-16Ignore pre-existing touchesChase Douglas
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> (cherry picked from commit 55fc42e7c9b4948cadd4f98ef7b6a3b12e268e3e)
2012-05-16Avoid out-of-bounds access by running num_active_touches < 0 (#49439)Peter Hutterer
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> (cherry picked from commit 77d766b1d535dff9a27c7db343ede85d9f44850b)
2012-05-11synaptics 1.6.1xf86-input-synaptics-1.6.1Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-11tools: coasting speed is not capped at 20, cap it at 255Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 0352c67fa2a7224b5a3bf03a934b3c7af42b4f51)
2012-05-11Fix coasting speed triggerPeter Hutterer
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> (cherry picked from commit 0de4445ff8e75aab208faf6383e76045934c6720)
2012-05-11Don't check for soft buttons if a button is already downPeter Hutterer
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> (cherry picked from commit a1d6784d790f081f8a6ea3a10d3cfa578aa10d5b)
2012-05-10whitespace fixPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10tools: undo indentation in synclient's parameter listPeter Hutterer
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-10Indent consistentlyPeter Hutterer
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-03synaptics 1.6.0xf86-input-synaptics-1.6.0Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-03Fix coasting for negative scroll directionsPeter Hutterer
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>
2012-05-02Fail if no backends can be foundPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-02Include a build for solarisNiveditha Rau
Signed-off-by: Niveditha Rau <niveditha.rau@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-02Force SLOTSTATE_EMPTY on DeviceOffPeter Hutterer
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>
2012-05-01Reset all hardware state on DEVICE_OFF (#49161)Peter Hutterer
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>
2012-04-30man: fix hyphenationPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-30man: drop mention of shm configurationPeter Hutterer
SHM is for debugging only now, not configuration. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-27synaptics 1.5.99.904xf86-input-synaptics-1.5.99.904Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-26Reset scroll delta when no finger is touchingPeter Hutterer
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>
2012-04-26Don't unconditionally divide by scroll_dist_vert (#46617)Peter Hutterer
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>
2012-04-26ClickPad is most definitely a bool option.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-04-26Init num_touches to 0 on startPeter Hutterer
We implicitly rely on this already since we calloc the struct. Do it expliclity on DeviceOn(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-04-26Reset touch state on DeviceOff (#49161)Peter Hutterer
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>
2012-04-24Update src/synproto.c license to the preferred MIT/X11 licenseChase Douglas
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-20Don't release the button on TS_3 if TapAndDrag is disabled (#31854)Peter Hutterer
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>
2012-04-20Print millis as unsigned intPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-20Ensure hw millis are monotonic (#48777)Peter Hutterer
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>
2012-04-19man: move ClickPad documentation into a single areaPeter Hutterer
Having to read only one section is a tad easier than collecting the separate options. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-04-17Fix coasting frictionChow Loong Jin
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>
2012-04-17Stop coasting when two-finger scroll beginsPierre Lulé
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>
2012-04-16synaptics 1.5.99.903xf86-input-synaptics-1.5.99.903Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-16Support inverted scroll direction.Alyssa Hung
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-13Use maximum number of touches reported by evdevChase Douglas
This resolves a regression from da461b91659d0c64aa6827e065aee2682116a57e where three touch tap and click actions on certain devices no longer work. Some devices report a higher touch count than the number of touches they can provide data for. For example, many Synaptics touchpads can report up to five touches, but only provide data for two of them. We need to be able to report the correct number of touches for these devices when there are three touches. Using the maximum of the reported touch count and the number of touches provided ensures the count is accurate for all device types. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>