Improve readability of the soft button areas

Replace the hardcoded indices with enums that are somewhat expressive.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
man: clarify that 0, not 0% disables the softbutton area

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Allow soft button areas to overlap on the edge

For percent-based configuration in the form of
middle button 33%-66%, right button 66%-0 we'd get an error because of the
one device unit overlap. This was neither documented nor useful, because
leaving a 1% gap leaves an actual gap between the buttons. Allow for an
overlap of one device unit on the edge of the buttons.

What's picked in that case depends on the implementation of
is_inside_softbutton_area but since one device unit is so small, it doesn't
matter.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix stack smash in clickpad_guess_clickfingers()

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>
Plug memory leak for option_string

xf86SetStrOption() returns a strdup'd string that must be freed after use.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Plug memory leak for priv->touch_axes

Allocated in event_query_touch, was never freed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
synaptics 1.7.1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Disable driver scaling for input ABI 19.2

For absolute devices in relative mode, i.e. touchpads, the server now takes
device resolution into account. Doing so means that the driver mustn't
scale, so we deactivate those bits in the driver.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0fb59b3487d57523a03f078a2061e2ea0cacbc7c)
Add missing property handler for the pressure motion factor

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 29318c1d94510cfb6d5d712e912af111f99edb42)
eventcomm: ungrab the device on DeviceOff

For symmetry, the kernel should ungrab when we close the fd.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

[modified for the 1.7 branch which isn't using libevdev yet]

(cherry picked from commit 5d391e352f4e502ada6444a7ce860683e3480fbf)
synaptics 1.7.2

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Dualhead resolution patch
2-finger tap patch
False release filtering patch