summaryrefslogtreecommitdiff
path: root/src/synproto.c
AgeCommit message (Collapse)Author
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-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-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-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-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-03-22Keep track of which touch slots are openChase Douglas
This change adds a new touch slot state that denotes when the slot is open but does not have any new data to report. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-14Add cumulative_d{x,y} to SynapticsHwStateChase Douglas
These values will be used for clickpad press and drag with two fingers. While the clickpad button is not pressed, cumulative_d{x,y} will match x and y values. Once the clickpad button is pressed, cumulative_d{x,y} will be updated with the relative motion of each active touch on the touchpad. This allows for dragging with one finger while another finger stays stationary holding the clickpad button down. This is an easier and less latent approach than trying to guess which touch was the "dragging" touch. [fixed build error for mt off] Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-14Add a BTN_EMULATED_FLAG to mark emulated buttons on clickfingersPeter Hutterer
And when copying the hardware state, don't copy those buttons that were set through emulation. This is a temporary fix only, we should add new fields to the hw struct that represent the various features as they are enabled/disabled and then treat them accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-02-11Move X touch event processing into synaptics.cChase Douglas
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-02-11Add touch valuator mask to hw state structureChase Douglas
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-02-10Introduce SynapticsCopyHwState functionChase Douglas
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-02-10Introduce SynapticsHwStateAlloc() and SynapticsHwStateFree()Chase Douglas
Put them in a new file so eventcomm-test can access them. 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>