summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-01-02Free 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>
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>
2012-10-24Recognise 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>
2012-10-08test: drop xf86CheckStrOption from fake symbolsPeter Hutterer
The tests don't need this symbol anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-09-15Enable ps2comm and alpscomm build on GNU/HurdSamuel Thibault
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
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>
2012-08-10Use LogMessageVerbSigSafe on ABI 18Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-08-01Decorate the accel log messages with (accel)Peter Hutterer
The MinSpeed message already does so, do it for MaxSpeed and AccelFactor too. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-06-22eventcomm: proto_data is not null, don't checkPeter Hutterer
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>
2012-06-22eventcomm: simplify conditionsPeter Hutterer
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>
2012-06-12Turn down the default sensitivity for unibody MacBook touchpadsChase Douglas
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>
2012-06-12Add MODEL_UNIBODY_MACBOOK touchpad model for bcm5974 devicesChase Douglas
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>
2012-06-05Remove leftover HAVE_SMOOTH_SCROLL typedefPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-06-05Move properties header to where it's neededPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-06-05ps2comm: use ErrorF from PS2DBG directlyPeter Hutterer
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>
2012-06-05Fix indentation for the synaptics protocol opsPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-31check for HAVE_CONFIG_H before including config.hPeter Hutterer
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>
2012-05-31Un-typedef model_lookup_tPeter Hutterer
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>
2012-05-31tools: un-typedef TouchpadStatePeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-31Remove typedefs from all enumsPeter Hutterer
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>
2012-05-31Remove an unused define for 1/sqrt(2)Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-21DeviceOn and friends return a status code, not a boolPeter Hutterer
No functional changes, just making things more obvious. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-18Remove @DRIVER_NAME@ from Makefile.amPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-18Fix indentation mishapPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-18Remove absolute modePeter Hutterer
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>
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>
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>
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>
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>
2012-05-15Remove defunct HAVE_MULTITOUCH compiler warningPeter Hutterer
Seems like this was a rebase gone wrong, HAVE_MULTITOUCH was removed in 3430f4af41184752d698dcbf4919469e36b3216c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-15Ignore 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>
2012-05-15Avoid 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>
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>
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>
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>
2012-05-10Rename force_empty parameter to set_slot_emptyPeter Hutterer
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>
2012-05-10Format Makefile.am, drop @DRIVER_NAME@.c usagePeter Hutterer
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>
2012-05-10Move synaptics.h leftovers to synapticsstr.h, drop synaptics.hPeter Hutterer
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-10Require xserver 1.12 and inputproto 2.2Peter Hutterer
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>
2012-05-10Update various Red Hat copyrightsPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-10Drop circular pad supportPeter Hutterer
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-10Purge scrollbuttons (repeat)Peter Hutterer
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-10Purge edge motionPeter Hutterer
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-10Purge fast-taps optionPeter Hutterer
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>
2012-05-10Drop trackstick emulation modePeter Hutterer
"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-10Bury shm - or what was left of itPeter Hutterer
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-10Bump to 1.6.99Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>