summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-02-21Merge branch 'devel' into mergePeter Hutterer
Conflicts: src/synaptics.c
2011-02-21Add hysteresis-based noise reductionSimon Thum
This introduces hysteresis into the driver's processing. It significantly reduces noise motion, i.e. now the pad does no longer generate a stream of sub-pixel events when just holding the position with the finger down. Also, taking off the finger no longer generates additional motion, scrolling becomes flicker-free etc. The code makes use of "fuzz" from the kernel, if available. This has not been tested extensively, as an overwhelming majority of evdev touchpad drivers view 0 (zero) as a good value for fuzz, forcing userland into assuming "zero fuzz" means "make zero assumptions about fuzz", not "there is no fuzz". Until things improve, this is what we do. Anyway, the fuzz a.k.a. hysteresis can be set/overridden with options and properties, as documented. Signed-off-by: Simon Thum <simon.thum@gmx.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-17Factor out edge speed calculation.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2011-02-17Factor out delta calculation into a static func.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2011-02-17Move delta calculation for trackstick out.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2011-02-17Reshuffle ComputeDeltas for less indentation.Peter Hutterer
No functional changes, just moving out of double-nested conditions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2011-02-17Don't expect a palm based on pressure (#22806)Peter Hutterer
If the first touch on the touchpad is above palm_min_z, the palm detection unsets the finger status ("probably palm"). Don't do that, for low values of palm_min_z this disables the finger during normal use of the touchpad. X.Org Bug 22806 <http://bugs.freedesktop.org/show_bug.cgi?id=22806> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-17syndaemon: reset idle time if the system time has changed (#31968)Peter Hutterer
If the system time is changed backwards while the touchpad is disabled through syndaemon it remains disabled until the time catches up with the previous idle time again. Avoid this by resetting last_activity with a time that will trigger re-enabling of the device. X.Org Bug 31968 <http://bugs.freedesktop.org/show_bug.cgi?id=31968> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-31synaptics: detect corner tap using the initial touch positionNicolas Cavallari
Currently, when detecting a tap release, the corner tap detection uses the current touch position to figure out which corner it corresponds. The problem is that, theoretically, there is no such position because there is no touch. It work in mosts cases because most touchpad are fast enough to still have a position on release, but some aren't. In that case, the driver do corner tap detection using the position given by the hardware when there is no touch, that is, (0,0), (1,5855) or whatever. The driver will detect them as corner tap, regardless of the initial touch position. On the default configuration, corner taps are ignored, so basically, these tap are not working. This patch make tap detection use the initial touch position to detect corner taps. Signed-off-by: Nicolas Cavallari <batchman@free.fr> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-17syndaemon.c: Add #include <string.h>Alan Coopersmith
Solaris FD_ZERO is defined using memset, but <sys/select.h> doesn't include <string.h> itself, leading to compiler warning: "syndaemon.c", line 404: warning: implicit function declaration: memset Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-17synclient.c: Replace old index() function with C89-standard strchr()Alan Coopersmith
Fixes Solaris compiler warnings of: "synclient.c", line 152: warning: implicit function declaration: index "synclient.c", line 152: warning: improper pointer/integer combination: op "=" Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-05Rename SHM functions from alloc/free_param_data to alloc/free_shm_dataPeter Hutterer
This naming is historical, we used to export the parameters through SHM. These days it's just confusing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-01-05Don't report all options unconditionally.Peter Hutterer
While this is useful to see all options provided, it also lists options that are not actually interpreted by the driver. Skip it, use xf86Set*Option() instead to just report the options handled by the driver. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-01-05Dont report the version explicitly, it's reported in the module blob anyway.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-01-05Use xf86SetStrOption instead of xf86FindOption for the DevicePeter Hutterer
xf86SetStrOption reports to the log if found. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-01-05Remove the need for XI86_CONFIGURED on input-ABI 12Peter Hutterer
Just move the assignment into an already if GET_ABI_MAJOR() block. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-06syndaemon: decouple background mode from quietnessAlessandro Guido
syndaemon currently outputs lots of stuff when not running in background mode. However, current init daemons and session managers can manage to launch the daemon in background without "-b" just fine (if not better), by doing the fork() themselves. Indeed, if one uses that setup, ie. by having syndaemon launched by GNOME at login, it gets the ~/.xsession-errors file spammed by Enable/Disabled messages. This patch fixes this by introducing a new verbose (-v) flag that enables those messages and makes syndaemon quiet by default. Signed-off-by: Alessandro Guido <ag@alessandroguido.name> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-23Fix 64bit arch issue in synaptics eventcomm.cTakashi Iwai
In C, "1" is an integer, not an unsigned long. Thus (1 << 33) doesn't give you the 33th bit shift, but it's undefined. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-02Input API 12 requires a valuator mode for each axis.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-18Remove convert_proc and close_proc.Peter Hutterer
Both aren't actually called by the server anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-18Replace two LocalDevicePtr with InputInfoPtr.Peter Hutterer
ABI 12 removes the LocalDevicePtr define from the server, InputInfoPtr is the replacement. Compile error introduced in 0b28a4c046a30ccb83278ea0aa59541fad89092c. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-14don't post motion events if the finger state is FS_UNTOUCHEDJoe Shaw
Works around some buggy touchpads that report their position as things like 0,0; 0,ymax; etc. at the same time as they turn off the finger tool and/or touch indication. This is particularly a problem when using the touchpad in absolute mode. Signed-off-by: Joe Shaw <joe@joeshaw.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-14post absolute coordinate motion events if device mode is absoluteJoe Shaw
Signed-off-by: Joe Shaw <joe@joeshaw.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-14track abs/rel mode changes in SwitchMode() instead of ignoring themJoe Shaw
Signed-off-by: Joe Shaw <joe@joeshaw.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-06Remove refcnt initialization from InputDriverRec.Peter Hutterer
Removed from the server with commit 6130170e7e9b64c611ee942ec3455dd1a185193d Author: Adam Jackson <ajax@redhat.com> Date: Sat Sep 18 06:41:35 2010 -0400 xfree86: Remove unused refcounting from input drivers And given that it was unused, we don't need to ifdef it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-05config: don't autoprobe when device was setGiuseppe Bilotta
If device was already set, we were asked to handle that specific device and we should not go probing around. If we do, we might end up handling a device different from what the X server thinks we are handling, with dire consequences in case of hot plugging and unplugging. Without this patch, a situation such as the following can happen. A user has both a built-in laptop touchpad and a tablet such as the Wacom Bamboo Pen & Touch, that is also exposed as a touchpad. The tablet is plugged in before the server starts, and during setup the server calls the synaptic driver for the /dev/input/mouseX device corresponding to the touch device of the tablet; we end up in the autoprobe path even though `device' was set, and the driver scans /dev/input, where the first useful device it finds is the event device for the built-in touchpad. The driver starts managing the built-in touchpad, preventing future instances from managing it too, while the server thinks the driver is managing the tablet. When the user disconnects the tablet, the corresponding instance of the synpatics driver (which is actually managing the touchpad instead) is unloaded: the built-in touchpad stops working in X. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-05config: collect options during preinitGiuseppe Bilotta
This must to ensure that the "Device" option is set correctly before SetDeviceAndProtocol is called, but it's only needed when the old input API is used. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01Bump to 1.3.99Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01Merge branch 'input-api'Peter Hutterer
Conflicts: src/properties.c
2010-09-01Use InputInfoPtr instead of LocalDevicePtr.Peter Hutterer
The latter is about to be removed from the server, InputInfoPtr has been around in all supported server versions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01Support the new input api.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-01synaptics 1.3.0xf86-input-synaptics-1.3.0Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-23man: use secondsĀ² instead of seconds per secondPeter Hutterer
Makes it hopefully slightly less confusing. Should have been amended before the push but ENOTENOUGHCOFFEE. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-23synaptics 1.2.99.901xf86-input-synaptics-1.2.99.901Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-20Enable coasting by default with a value of 20.Peter Hutterer
The default value for friction coasting makes coasting much more useful now since it stops coasting after a while. Enable it by default, the man page already claims a default of 20 anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-20Added "friction physics" so coasting can stop on its own.Patrick Curran
When you are coasting (but not corner coasting) you might want the scrolling to slow down and stop on its own. This also lets you start coasting while using a two finger scroll. Signed-off-by: Patrick Curran <pjcurran@wisc.edu> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-20Reset X/Y hist on multi finger transition to fix jumpsChris Bagwell
Most modern touchpads track 1st finger during multi-touch. If first finger is lifted then a jump will occur as X/Y transition to next finger location. Resetting X/Y history as each finger is lifted will hide this transition. Synaptics hw specs claim older hardware report X/Y values that are average point between multi-fingers which can cause unwanted jump. Reset X/Y history during transition to new fingers to hide this as well. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-20Increase the default acceleration factor.Peter Hutterer
With 4e0e53fcba6fd99d458df1905d055d63360155c0 the driver got it's own acceleration mechanism. This slowed down the pointer movement a lot, especially on ALPS touchpads. Increase the default acceleration factor to accommodate for this. The number itself is chosen through guesswork and informal tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Magnus Kessler <Magnus.Kessler@gmx.net> Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net>
2010-08-19Up the precision of MaxSpeed and AccelFactor log output.Peter Hutterer
MaxSpeed usually has two decimals that matter, AccelFactor doesn't get intersting until the second decimal, so print 3. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-17synclient: don't print "missing" if a property doesn't exist.Peter Hutterer
Virtually all touchpads still in use have one or more properties missing anyway. If it's not in the list, then it's missing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-22Reshuffle initialization in preparation for new input API.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-22Add some ifdefs missing from XINPUT ABI 12Peter Hutterer
These flags are not used in the newer servers anymore. Define them locally, remove the defines once we stop supporting server 1.9. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-22Remove XI86_POINTER_CAPABLE usage.Peter Hutterer
This is a write-only flag. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-21Align EmulateTwoFinger* docs to current behavior.Chris Bagwell
This corrects man page to mention EmulateTwoFingerMinW and EmulateTwoFingerMinZ are considered together. Old man page read like driver would emulate two-finger even if only pressure OR width (but not both) were supported. Next, add note to align man page with patch that defaults to enabling two-finger emulation on hardware that does not support two-finger detection but does support pressure and width detection. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-21Default to 2-finger emulation when HW supports itChris Bagwell
Ideally, emulating 2-fingers should just work on hardware were it can be supported. This patch is to do that. Currently, emulateTwoFingerMinW defaults to 7. Most kernel drivers do not support reporting finger width and so can't get above MinW of 7. Synaptics devices hardcode width value to 5 when hardware doesn't support width and 7 is a good threshold to detect 2 fingers on hardware that does. bcm7954 are only other devices that report width and they support reporting DOUBLETAP and wouldn't need emulation anyways. emulateTwoFingerMinZ defaulted to a really high value so never let Synaptics devices to emulate 2-fingers by default. Changed default to a low value (same as FingerHigh) when hardware doesn't support DOUBLETAP and supports width so emulations will now work by default in all the right cases. I'm working to get kernel to stop reporting ABS_TOOL_WIDTH unless hardware really supports it. If that would have been behavior in first place then we could also default to 2-finger scrolling as well. Since its not reliable, we should continue defaulting to side scrolling. Config GUI's will want to now allow switching between 2-finger and edge scrolling when new property indicates width is supported. GUI's should also update the above MinZ and MinW's to values similar to our defaults. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-21Document Capabilities property additions in manChris Bagwell
Documents has_pressure and has_width additions. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-21Expose width support in capabilites properity.Chris Bagwell
Some properties are only valid with hardware supports width. Namely, *MinW properties. Config GUI's may wish to disable/grey out options related to width support. This combined with pressure property is good indication when 2 finger scrolling can be supported using emulation. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-21Expose pressure support in capabilities property.Chris Bagwell
Some properties are only valid when hardware supports pressure. For example, the *MinZ and *MaxZ options. Config GUI's may wish to disable/grey out config options related to pressure since not all hardware supports it. This will allow for that. Also, change setting of priv->has_pressure to boolean value so its value will always fit in 8-bit that properities report. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-19Make default checks for x, y, w, and p separate.Chris Bagwell
Some input devices will not return any ranges and current code seems geared towards those. It assumed if invalid X/Y ranges then that was only case for invalid W and Pressure. Synaptics kernel drivers have been returning valid X/Y/Z values but invalid 0/0 values for P. Split up checks to allow setting defaults for any combination of unspecified or invalid values. I also think there was a bug in older code. It seemed odd it was checking minx > maxx but miny < maxy. I changed both to ">=" so that it also catches kernel reports of 0/0 and logically invalid ranges (i.e. 6/6 or 9/1). Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-23Remove one leftover xcalloc.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>