summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-02-16Prefer multitouch over single-touch axis rangesHEADmasterChase Douglas1-4/+41
We still use single-touch data in most cases, but sometimes the multitouch axes have higher resolution. Since we use the same XI valuators to report ST and MT data, we must pick one axis and scale the other to match. This change picks the MT axis ranges. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-11Filter touch events if two-finger scrolling is enabledChase Douglas1-2/+3
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-11Filter touch events if tap actions are enabledChase Douglas1-2/+2
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-11Filter touch events if click actions are enabledChase Douglas1-3/+13
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-11Move X touch event processing into synaptics.cChase Douglas6-152/+157
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 open_slots array to SynapticsPrivateChase Douglas2-47/+74
Initialize touch stuff in a separate function for readability. 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 Douglas5-9/+110
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-11Rename num_touches to max_touchesChase Douglas3-4/+4
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 Douglas6-5/+14
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-10Allocate priv->hwStateChase Douglas2-10/+19
This is needed for when SynapticsHwState can't be allocated on the stack. 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-10Allocate SynapticsPrivate.comm->hwStateChase Douglas6-4/+11
This is needed for when SynapticsHwState can't be allocated on the stack. 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-10Allocate SynapticsHwStruct for local function useChase Douglas2-7/+17
SynapticsHwStruct (SHS) will soon include ValuatorMasks, which can only be allocated on the heap. The input driver callbacks are called in signal context, so we can't instantiate a new SHS when that occurs. Since we only ever need one SHS, allocate one at device init time and use it in place of local SHS instances. 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-10Transition eventcomm-test to new SynapticsHwState instantiation schemeChase Douglas2-35/+72
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 Douglas3-0/+50
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>
2012-02-10Allocate proto data in eventcomm-testChase Douglas3-1/+18
Provide a helper function for allocating proto data and use it in eventcomm-test. This ensures a null pointer for priv->proto_data is not dereferenced. 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-09Revert "Replace the motion estimator"Chase Douglas1-68/+4
The algorithm is completely wrong because it uses subtraction of unsigned variables. The negative effects of this commit manifest in cursor warps to edges or corners of the screen. Since the algorithm has never worked right, previous testing must be disregarded. Revert it until we have a tested algorithm. This reverts commit b26125e412a130b7a8f8b6adf9ffc8e9cc8df42c. Conflicts: src/synaptics.c Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-07Submit the right number of MT axesPeter Hutterer1-1/+2
For devices with only x/y, num_mt_axes is 0, since x/y are already counted elsewhere. The server will then fail to init the TouchClassRec since it expects at least 2 touch axes. Fix this, assume we always have at least two touch axes if we have any touch axes at all. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-02-07Merge branch 'fixes' of ↵Peter Hutterer1-8/+99
git://people.freedesktop.org/~cndougla/xf86-input-synaptics
2012-02-06Don't initialize semi-multitouch devices for touch device classfixesChase Douglas1-0/+10
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2012-02-06Don't initialize touch state if device does is not multitouchChase Douglas1-1/+7
And don't attempt to use it either. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2012-02-06Don't emit touch sequences if only one touch is activeChase Douglas1-7/+82
When a second touch begins, emit a touch begin for the first touch with the current valuator values. When a touch ends and we are going from two touches down to one touch, end both touches. This ensures we don't send a touch sequence at the same time we are moving the pointer. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2012-02-07eventcomm: Fix initialization codeBenjamin Otte1-2/+2
num_mt_axes contains the number of non-x/y multitouch axes, and the valuator mask needs to contains x, y, followed by two empy values for the scroll valuators, followed by the remaining MT axes. https://bugs.freedesktop.org/show_bug.cgi?id=45663 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-06Only move the cursor when one touch is on a touchpadChase Douglas1-3/+3
Otherwise, we might post motion events and touch events for the same physical interaction. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-06Ensure delta computation does not go crazyChase Douglas1-0/+8
I have seen this a couple times, but I haven't been able to catch it when it starts. It's a feedback loop, so once you miss the entrance of the loop, you can't see what really went wrong. This patch papers over the issue for now. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-06Remove compiler warning: unused variable "atom"Peter Hutterer1-1/+0
synaptics.c: In function 'DeviceInit': synaptics.c:1161:18: warning: unused variable 'atom' [-Wunused-variable] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-02-04synclient: fix indentation of "format mismatch" parametersPeter Hutterer1-3/+3
Prefix is 4 spaces, not three. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-26eventcomm: Add touch event handlingChase Douglas2-22/+258
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-26eventcomm: Read evdev events from mtdev where multitouch is availableChase Douglas1-1/+22
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-26eventcomm: Initialize touch device and axesChase Douglas4-6/+149
Use mtdev to ensure touches are tracked and of evdev MT protocol type B. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-26Add touch device class supportChase Douglas3-5/+80
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-26Allocate axis labels array dynamicallyChase Douglas1-1/+11
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-06Constify priv->deviceDaniel Stone2-2/+2
Fixes a compiler warning due to discarding the const qualifier as it comes back from the option code. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-04test: fix build error introduced in 9f9b55ab55ed5Peter Hutterer1-1/+0
Bad search/replace, ended up in two xf86SetStrOption declarations which differed on ABIs < 14. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=44335 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-01-04Remove unused variable 'thr'Peter Hutterer1-1/+0
synaptics.c: In function 'SynapticsAccelerationProfile': synaptics.c:619:12: warning: unused variable 'thr' [-Wunused-variable] On input ABIs < 14. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-01-03fix wrong finger width rangeJJ Ding1-2/+1
Signed-off-by: JJ Ding <dgdunix@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12test: fix build errors introduced by upstream server changePeter Hutterer2-5/+8
Introduced by upstream change xorg-server-1.11.99.1-33-g09e4b78, Fix gcc -Wwrite-strings warnings in xf86 ddx Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12Revert: "eventcomm: replace synaptics-custom TEST_BIT with server's BitIsOn."Cyril Brulebois1-20/+23
This commit reverts 13543b156d78bc4d01a19844a5ee8f283269621b As seen in Debian's #648488, this switch causes a regression on PowerPC, especially seen on iBook G4 with appletouch. Take a defensive stance and revert back to a working state until things have been figured out and fixed properly. Since things have evolved and since that revert triggers a lot of conflicts, the following method was applied: - manual reintroduction of the 3 removed macros: OFF, LONG, TEST_BIT - coccinelle semantic patch to revert from BitIsOn to TEST_BIT Coccinelle semantic patch: @@ expression a,b; @@ -BitIsOn(a,b) +TEST_BIT(b,a) Bugzilla: http://bugs.debian.org/648488 Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-12-01If protocol is auto-dev and the device path is set, unset the protocolPeter Hutterer1-0/+7
The remainder of the handling code will take try through all protocols, taking the device into account (as of xf86-input-synaptics-1.4.0-34-g241254e) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-01Return true/false from SetDeviceAndProtocolPeter Hutterer1-3/+4
Instead of requiring the caller to know which private field indicates failure, just return true on success or false on failure. No functional change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-24Use the scroll distances as increment for scrolling valuator axesPeter Hutterer2-12/+26
XI2.1 allows an 'increment' for each scrolling variable. Use that instead of hiding it away inside the driver. For circular scrolling, the increment is the one of the respective scrolling axis. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-24Scroll: Initial smooth scrolling supportDaniel Stone2-3/+66
Post smooth-scrolling events through the new X server API when available, rather than legacy jerky button events. [Amended to use the final smooth scrolling API] Signed-off-by: Daniel Stone <daniel@fooishbar.org> Amendments-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-24eventcomm: print strerror(errno), not of rcPeter Hutterer1-1/+1
Found by coverity. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
2011-10-18Fix compiler warning - unused variable 'para'Peter Hutterer1-1/+0
synaptics.c: In function 'post_scroll_events': synaptics.c:2426:26: warning: unused variable 'para' [-Wunused-variable] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-18Scroll: Prepare ScrollData for smooth scrollingDaniel Stone2-85/+52
Convert ScrollData from up/down/left/right members for button presses, to more fine-grained delta_x and delta_y members, and move these to priv->scroll. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-18Adjust acceleration scheme for input ABI v14Daniel Stone1-3/+14
v14 wants doubles, rather than floats, from acceleration schemes. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-12test: wrap ABI 14 xf86OptionRec type changesPeter Hutterer2-42/+48
ABI 13 still uses pointer as type for most option calls, ABI 14 uses the proper type now. Wrap this so we can build against both versions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-21Extra buttons on Acer Ferrari 4000 laptop touchpad are not recognizedCasper Dik1-1/+1
The code was checking for a value of exactly 1, while the Synaptics docs at http://www.synaptics.com/sites/default/files/511-000275-01rA.pdf say: Extended Model ID. This query returns the product ID, additional capability bits, and additional bits to widen the infoSensor field. infoSensor is a part of the Model ID query (query $03). The Extended Model ID query is only present if nExtendedQueries is *greater than* or equal to 1. Signed-off-by: Casper Dik <casper.dik@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-06man: note that a PS/2 device is not supportedPeter Hutterer1-1/+3
If all we see is a PS/2 Mouse or similar, then the kernel doesn't give us the required bits to provide all the functionality we want. Note that in the man-page. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-08-29The correct maximum values for pressure and finger widthAlexandr Shadchin1-4/+4
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-29On/Off hooks to return boolean so we can bail out of the callerAlexandr Shadchin4-9/+17
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>