Indent consistently

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>
tools: undo indentation in synclient's parameter list

more more readable this way

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
whitespace fix

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Bump to 1.6.99

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Bury shm - or what was left of it

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>
Drop trackstick emulation mode

"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>
Purge fast-taps option

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>
Purge edge motion

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>
Purge scrollbuttons (repeat)

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>
Drop circular pad support

Do such devices still exist?

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Update various Red Hat copyrights

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Require xserver 1.12 and inputproto 2.2

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>
Move synaptics.h leftovers to synapticsstr.h, drop synaptics.h

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>
Format Makefile.am, drop @DRIVER_NAME@.c usage

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>
Rename force_empty parameter to set_slot_empty

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>
Don't check for soft buttons if a button is already down

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>
Fix coasting speed trigger

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>
tools: coasting speed is not capped at 20, cap it at 255

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Avoid out-of-bounds access by running num_active_touches < 0 (#49439)

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>
Ignore pre-existing touches

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>