Update to xf86-input-synaptics 1.8.0.

ok matthieu@, tested claudio@
This commit is contained in:
shadchin 2014-05-17 17:18:21 +00:00
parent 05ed5123d1
commit c896ccf8ec
28 changed files with 1362 additions and 2381 deletions

View File

@ -1,53 +1,320 @@
commit baca0fde5958d9dc17a9b13372cc8819170e2f74
commit 3a4cc96590ca0e0ff526a5e5406f29a402bddd1a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Apr 29 14:27:30 2014 +1000
Date: Tue May 13 11:20:25 2014 +1000
synaptics 1.7.5
synaptics 1.8.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit bbaf4d646ebf4393a1ee0eb9bcc569054ed878f9
commit d4d7229c41a20cf6757882a24f45e28d936a27c5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Mar 20 11:51:17 2014 +1000
Date: Wed Apr 30 13:08:53 2014 +1000
Avoid erroneously handling two touchpoints in the same slot
conf: drop the PNPID matching from the fdi file
If a slot's ABS_MT_TRACKING_ID event was received during SYN_DROPPED, the
driver isn't aware that a touchpoint has started or ended in that slot. When
the next ABS_MT_TRACKING_ID event arrives, the driver would unconditionally
close or open a new touchpoint. This could lead to two or more touchpoints
being opened in the same slot, the first of which is never terminated.
Or it could lead to a touchpoint being terminated that was never opened.
The event sequences that trigger this are:
ABS_MT_TRACKING_ID 83
ABS_MT_TRACKING_ID -1
SYN_DROPPED // new touchpoint started here
ABS_MT_TRACKING_ID -1
and
ABS_MT_TRACKING_ID 83
SYN_DROPPED // touchpoint ended here
ABS_MT_TRACKING_ID 84
ABS_MT_TRACKING_ID -1
We don't properly handle SYN_DROPPED, but we can avoid this by only starting a
new touchpoint when we transition between -1 and a valid tracking ID.
Rely on INPUT_PROP_TOP_BUTTONPAD and default button areas as well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit a21b3bd602b31ee995b391a7b917282e7b0a1c33
commit a31ecb669f40d8db3ab1867eaedfe364bbd6fafe
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Mar 20 10:58:53 2014 +1000
Date: Wed Apr 30 07:45:34 2014 +1000
eventcomm: drop assumption of non-zero slot offset
The kernel guarantees this is always 0
synaptics 1.7.99.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 91cc1e82143b939bfb4fce97429b07105333e146
commit efa424b5c9c084c1c1136a68329709c7dc9ddfda
Author: Clinton Sprain <clintonsprain@gmail.com>
Date: Tue Apr 29 19:47:17 2014 -0500
Fix product ID cutoff for MODEL_APPLETOUCH/MODEL_UNIBODY_MACBOOK
Some Macbooks are being tagged as MODEL_UNIBODY_MACBOOKs when they should not
be. This causes the default sensitivity to be very low for them, making the
touchpad almost unusable. This change puts those devices into the correct
bucket again.
Signed-off-by: Clinton Sprain <clintonsprain@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 7bf27568417691e772e715f8fc6c30ea7ec892d6
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue Apr 22 18:58:11 2014 +0200
Add support for INPUT_PROP_TOPBUTTONPAD
Add a HasSecondaryButtons boolean config option which defaults to true for
devices with the INPUT_PROP_TOPBUTTONPAD and false for all other devices.
Only parse the SecondarySoftButtonAreas when this option is true, effectively
disabling the top buttons when it is false. Likewise, only initialize the
SecondarySoftButtonAreas property if we enable support for it.
This means that it is now safe to always set a SecondarySoftButtonAreas
default in 50-synaptics.conf, and that he section which was intended for
use with future pnp-id matching can be dropped, as that is now all handled
in the kernel.
While at also remove the comment about disabling the bottom edge area, as that
is now done automatically.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit 41afac2abf12dd74a171f726b57014f7fb266957
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Apr 29 12:13:10 2014 +1000
man: add some missing quotes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit a6f0f4c9a5bcb0e25343dd4c59d4cc47cc5e8006
Author: Hans de Goede <hdegoede@redhat.com>
Date: Fri Apr 11 20:41:36 2014 +0200
Always count tripletap + click as 3 fingerclick on pads with < 3 touches
When trying to do a 3 fingerclick on a touchpad which only tracks 2 touches,
this may register as a 3 or 2 fingerclick depending on the order in which
the touchpad detects the fingers. If the 2 outer fingers of the 3 get seen
first, then the 2 touches will be too far apart for the heuristic to see
them as being close together, and the click gets counted as a 2 finger click.
A user will likely never do a 2 finger click with a 3th finger resting
somewhere else on the pad, where-as the above misdetection of the clicks is
a real issue, so simply always count a click with trippletap set as a
3 finger click on pads which track less then 3 touches.
https://bugzilla.redhat.com/show_bug.cgi?id=1086218
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit f183c1c38778b659b4c75a0e2c532dd5a9f8d437
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Apr 9 10:41:29 2014 +1000
conf: add more PnPIDs and DMI matches for Lenovos
And expand DMI strings to more precise matches
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit 62ef210d11714703345dc8d35915ff53c37aee01
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Apr 7 16:16:13 2014 +1000
Comment the touch states
Everytime I look at this I get confused about OPEN_EMPTY vs EMPTY. Let's fix
that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit bfceb1bc580656aceb14e4b0f880bfcb3e4bc368
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Apr 4 15:51:22 2014 +1000
eventcomm: Hook up the libevdev log handler
This is a bit problematic: libevdev only has one global log handler.
So if we have another driver use libevdev, we'll either overwrite that handler
or get overwritten, whichever comes first. So we need to re-set the handler
every time we get an event to make sure we log through our handler.
Likewise, if we ever drop the device, we need to unset the log handler back to
NULL because we may unload the module and our handler may disappear.
Use the lowest logging priority, let the server filter based on the verbosity
level instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit 6ad856790630393bbd41b0bd7746ed9b0629a7c6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Apr 3 16:41:15 2014 +1000
eventcomm: read one more event after finishing a sync
Once the sync finishes, we get -EAGAIN. This only indicates the sync is done,
but some events may still be waiting in the pipe for us to read. We must read
those now, otherwise select may not trigger on further data.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit bec41416dbbee73eef9eee122d0acacc148e329d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Apr 3 15:42:45 2014 +1000
eventcomm: drop superflous helper function
last_mt_vals_slot is only used in one location and there we can just use
cur_slot
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit f1948e08ee9894864254a18098e4f4fceb6e322f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Mar 19 15:08:15 2014 +1000
Disable GrabEventDevice by default
This was required when we started supporting hotplugging to avoid duplicate
events. These days the drawback of not being able to record events in the case
of a bug is significant.
Check the configuration source on init. If the device was hotplugged through a
a server config backend, disable the grab. If the device was statically
configured through an xorg.conf then leave the default grab enabled to avoid
a duplicate device.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit fd709900445e3cb9f31ce7e780bfa98ecb6dab9b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Mar 18 07:28:44 2014 +1000
synaptics 1.7.99.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit dc5474964d4ec73b5c324961026e1037bb344946
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Mar 17 14:55:37 2014 +1000
If the touchpad is in TOUCHPAD_OFF mode, allow physical clicks
Enabling clicks in off mode also allows for the new Lenovo *40 series to use
the top software buttons while the touchpad is disabled. This benefits those
that usually disable touchpads altogether but still need the buttons for the
trackstick.
This changes existing behaviour, but TouchpadOff was always intended to stop
erroneous events while typing. Physical button presses are hard to trigger
accidentally. On the touchpads that TouchpadOff concept was originally
designed for the buttons are nowhere near the keyboard and are physically
separated from the touchpad anyway. On Clickpads, triggering a physical
click requires more force than accidentally touching the surface.
https://bugs.freedesktop.org/show_bug.cgi?id=76156
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit 4122db68f61c695eae3a65aec18db08b29898b6a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Mar 13 08:26:08 2014 +1000
conf: automatically enable the top softbutton area for the new Lenovos
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 18dae625eada20c4486542f9bb037fa2782d75bd
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Sun Aug 5 14:32:08 2012 +1000
conf: apply ClickPad softbuttons option through fdi file too (fixed version)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit f2cb48e6eee47fa621edaaf2f75b495b12f6eb55
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Mar 13 10:14:40 2014 +1000
Revert "conf: apply ClickPad softbuttons option through fdi file too"
Bad fdi file, type="string" is missing and it wouldn't merge properly.
This reverts commit a35b2d629d85d7a8c82621a5098a17e5ffb341dc.
commit a35b2d629d85d7a8c82621a5098a17e5ffb341dc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Sun Aug 5 14:32:08 2012 +1000
conf: apply ClickPad softbuttons option through fdi file too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 17bbcad28000bbd896a33047c0720ada89e05f5d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Mar 12 14:11:29 2014 +1000
Revert "Add another third state to TouchpadOff for disabling all but button clicks"
This third state is not needed, the behaviour of the touchpad driver is now
good enough to not need an external syndaemon instance to toggle this third
state.
This reverts commit eea73358760c7ff9c9dac061f265753637c6f25c.
Conflicts:
man/synaptics.man
src/synaptics.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit b40a5255fe73f7f95c8ff7145dd91605f3430119
Author: Stephen Chandler Paul <thatslyude@gmail.com>
Date: Mon Mar 10 18:33:20 2014 -0400
Don't allow any type of movement starting in the top softbutton area
Clicking in the top soft button area causes the trackpad to begin
registering motion, even if the finger never leaves the top soft button
area. We don't want this kind of behavior for the top soft button area,
since it makes clicking and dragging items much more difficult when
using a pointing stick.
Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 9a419ba01c53a38b4b601f4415801fca29a2b4e2
Author: Stephen Chandler Paul <thatslyude@gmail.com>
Date: Mon Mar 10 18:25:20 2014 -0400
Replace is_inside_anybutton_area with current_button_area
Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 2e5c0cf4395a0cf7b024495deab75f4ebe949e9a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Mar 10 16:43:54 2014 +1000
eventcomm: drop mtdev
All kernel touchpad devices now support slots, there isn't really a need to
support protocol A devices in synaptics. If such devices exist, we just treat
them as non-multitouch devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
commit c90a76ab0e752be0be4d9d835289df05d783f979
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Mar 10 16:35:45 2014 +1000
eventcomm: drop some use of mtdev
When checking the device don't open a new mtdev instance, use the existing
libevdev struct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
commit 5b7e1726369d4973859996f225bec743c2e21288
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Mar 10 16:42:34 2014 +1000
@ -58,17 +325,248 @@ Date: Mon Mar 10 16:42:34 2014 +1000
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
(cherry picked from commit 5b7e1726369d4973859996f225bec743c2e21288)
commit 8a5533aaa7e6e57bca7674de4cd25b3a18217d44
commit 040dfeba6886b8e910fb6b347c283e60fe24a147
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Mar 12 09:42:38 2014 +1000
Date: Tue Mar 11 14:50:01 2014 +1000
synaptics 1.7.4
eventcomm: fix wrong event code for SYN_REPORT
This was supposed to emulate a SYN_REPORT event so that the upper layers
process what's in the queue.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
commit 66240dc329683f0141c1e11590ea2c3d8ca25788
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Mar 10 09:07:59 2014 +1000
Add property support for secondary (top) software buttons
This was originally intended as a fixed xorg.conf option only (and still
largely is seen as such). Secondary software button are required only on a specific series
of touchpads and should be pre-configured by the system and/or the
distribution. As such, the property will not be initialized if it is not set
in the xorg.conf and will thus not respond to runtime changes.
Exposing the property in this way gives clients a chance of detecting if a top
software button area is present and thus adjust their behaviour accordingly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
commit 80efc2f54f11a4d45411951f7055bfec2ed40fee
Author: Hans de Goede <hdegoede@redhat.com>
Date: Sat Mar 8 10:41:14 2014 +0100
synaptics: Add support for server managed fds
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit c431d900f54696f608312ea51b1fa671839f7d42
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Feb 26 15:30:55 2014 +1000
man: fix documentation about the new touchpad state
leftover from an earlier revision
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit c189854a688465c820d5ef5767e00b69394a1601
commit bbe4c56c4998a90b478581a4d93717251d8e05be
Author: Hans de Goede <hdegoede@redhat.com>
Date: Fri Feb 21 10:31:44 2014 +0100
Wait for *new* coordinates on a clickpad click before reporting the click
It is possible for a click to get reported before any related touch events
get reported, here is the relevant part of an evemu-record session on a T440s:
E: 3.985585 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
E: 3.997419 0003 0039 -001 # EV_ABS / ABS_MT_TRACKING_ID -1
E: 3.997419 0001 014a 0000 # EV_KEY / BTN_TOUCH 0
E: 3.997419 0003 0018 0000 # EV_ABS / ABS_PRESSURE 0
E: 3.997419 0001 0145 0000 # EV_KEY / BTN_TOOL_FINGER 0
E: 3.997419 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
E: 5.117881 0001 0110 0001 # EV_KEY / BTN_LEFT 1
E: 5.117881 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
E: 5.133422 0003 0039 0187 # EV_ABS / ABS_MT_TRACKING_ID 187
E: 5.133422 0003 0035 3098 # EV_ABS / ABS_MT_POSITION_X 3098
E: 5.133422 0003 0036 3282 # EV_ABS / ABS_MT_POSITION_Y 3282
E: 5.133422 0003 003a 0046 # EV_ABS / ABS_MT_PRESSURE 46
E: 5.133422 0001 014a 0001 # EV_KEY / BTN_TOUCH 1
E: 5.133422 0003 0000 3102 # EV_ABS / ABS_X 3102
E: 5.133422 0003 0001 3282 # EV_ABS / ABS_Y 3282
E: 5.133422 0003 0018 0046 # EV_ABS / ABS_PRESSURE 46
E: 5.133422 0001 0145 0001 # EV_KEY / BTN_TOOL_FINGER 1
E: 5.133422 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
Notice the BTN_LEFT event all by itself!
If this happens, it may lead to the following problem scenario:
-touch the touchpad in its right click area
-let go of the touchpad
-rapidly click in the middle area, so that BTN_LEFT gets reported before the
new coordinates (such as seen in the trace above, this may require some
practicing with evemu-record to reproduce)
-the driver registers the click as a right click because it uses the
old coordinates from the cumulative coordinates to determine the
click location
This commit fixes this by:
1) Resetting the cumulative coordinates not only when no button is pressed,
but also when there is no finger touching the touchpad, so that when
we do get a touch the cumulative coordinates start at the right place
2) Delaying processing the BTN_LEFT down transition if there is no finger
touching the touchpad
This approach has one downside, if we wrongly identify a touchpad as
a clickpad, then the left button won't work unless the user touches the
touchpad while clicking the left button.
If we want we can fix this by doing something like this:
1) Making update_hw_button_state return a delay; and
2) Tracking that we've delayed BTN_LEFT down transition processing; and
3) When we've delayed BTN_LEFT down transition return a small delay value; and
4) If when we're called again we still don't have a finger down, just
treat the click as a BTN_LEFT
But this is not worth the trouble IMHO, the proper thing to do in this
scenario is to fix the mis-identification of the touchpad as a clickpad.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 743c45b9cfd057d00c37dab1cfca4b6202fb2642
Author: Hans de Goede <hdegoede@redhat.com>
Date: Fri Feb 21 10:31:43 2014 +0100
On button down update cumulative to current x and y, instead of previous
When a button click and new coordinates get reported in one go we sync the
cumulative coordinates to the old x and y, rather then the newly reported ones.
This keeping of the old coordinates causes the following issue:
-touch the touchpad in its right click area
-let go of the touchpad
-rapidly click in the left click area (or middle area), so that the
new location and the click get reported in one syn (may require some
practicing with evemu-record to reproduce)
-the driver registers the click as a right click because it uses the
old coordinates from the cumulative coordinates to determine the
click location
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 71652fe1f0800b081ba5602e9edda22a8d8d628e
Author: Hans de Goede <hdegoede@redhat.com>
Date: Fri Feb 21 10:31:42 2014 +0100
Ignore motion the first X ms after a clickpad click
This fixes my #1 anoyance with clickpads, where 2 out of 3 clicks turn into
a click + drag unless I hold my finger really really still.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Replaced property with a hardcoded 100ms. This is not something that we should
expose as property, we should find a delay that works best and live with it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 3adaf4623845dce54129b6474f4f8f2966f9bc47
Author: Hans de Goede <hdegoede@redhat.com>
Date: Fri Feb 21 10:31:41 2014 +0100
Don't report motion inside soft-button areas
Unless the motion has started outside the soft-button area.
Note that we must start reporting motions regardless of whether we think we're
in the button area or not as soon as we've switched to using cumulative
coordinates, since then the coordinates are no longer absolute.
This fixes the reporting of unintended motion just before a click in a soft
button area which sometimes causes mis-clicks.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit effeee86c1c286cd09ab750efc4932790dd560dd
Author: Hans de Goede <hdegoede@redhat.com>
Date: Fri Feb 21 10:31:40 2014 +0100
Get rid of old_hw_state
We only use it to store button state which we already have in
priv->lastButtons.
While at it also properly indent the code block checking the various
soft button areas.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 840670508e0150ae11ae744c676253c7fba332dc
Author: Hans de Goede <hdegoede@redhat.com>
Date: Fri Feb 21 10:31:39 2014 +0100
Add an enum for the different soft_button_areas
While at it also move the enum for the soft button edges out of
is_inside_button_area() so that it can be used elsewhere too.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit eea73358760c7ff9c9dac061f265753637c6f25c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Feb 21 10:31:37 2014 +0100
Add another third state to TouchpadOff for disabling all but button clicks
On a new set of laptops like the Lenovo T440 the trackstick does not have
physical buttons. Instead, the touchpad's top edge is supposed to acts
software button area. To avoid spurious cursor jumps when the trackstick is in
use and the finger is resting on the touchpad, add another mode that disables
motion events.
Enabled by syndaemon with -t click-only, the default stays unchanged. No
specific integration with the traditional disable-while-typing is needed. On
such touchpads, disabling motion events is sufficient to avoid spurious
events and we don't want to stop HW buttons to send events.
Note that this only adds the new state to the driver and to syndaemon, there
is nothing hooked up otherwise to actually monitor the trackstick.
Special note for syndaemon: optional arguments are a GNU extension, so work
around it by messing with an optstring starting with ":" which allows us to
manually parse the options.
Original version of this patch by John Pham <jhnphm@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit ac78616d074f2d248543411c106f0d1befeef58d
Author: Keith Packard <keithp@keithp.com>
Date: Sat Feb 22 01:44:38 2014 -0800
When re-opening evdev, set the fd before trying to grab
If we try to grab the evdev device before we've set the new file
descriptor, libevdev_grab returns -EFAULT, which causes DeviceOn to
fail.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 22fe8bdc6668e78853768c62f4d1331114c7eca0
Author: Keith Packard <keithp@keithp.com>
Date: Sat Feb 22 01:44:37 2014 -0800
@ -76,9 +574,60 @@ Date: Sat Feb 22 01:44:37 2014 -0800
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 22fe8bdc6668e78853768c62f4d1331114c7eca0)
commit 503082bf17dfc4cb3d4b794ea514ac6f413c07f2
commit 402cc872570b58b8420e7973d0706f3b2a2aaf91
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Thu Feb 20 13:13:18 2014 -0500
Add secondary (top) software buttons area
New generation of laptops with trackstick do not have physical buttons
associated with the trackstick, but instead rely on software buttons at
the top of the clickpad.
Adding a secondary software button area for this purpose.
As we're likely detecting the devices that need it based on udev tags
and MatchTag configuration items, this area doesn't need to be exposed
through properties. So static configuration is fine.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
[couple of man-page additions and rewrites]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 945acfc261707be78cbc5438c22b061e20076004
Author: Hans de Goede <hdegoede@redhat.com>
Date: Wed Feb 19 18:30:35 2014 +0100
Allow using the entire touchpad for motions started inside the active area
synaptics offers an option to make parts of the touchpad insensitive. This
is ie useful to do palm avoidance rather then palm detection (which may be
unreliable) by disabling an area of 15% on the right and left side of the
touchpad.
Currently a motion which has started inside the active area, stops as soon
as it moves outside of the active area.
If a motion started inside the active area and thus has already generated some
move events, this makes no sense. If the user moves outside of the active
area in this case, this is very likely because the user wants to continue
the motion.
This commit allows such motions to continue normally.
I would like to thank Juerd Waalboer for the basic idea, some coding and lots
of testing for this fix.
Cc: Juerd Waalboer <juerd@tnx.nl>
Reported-by: Juerd Waalboer <juerd@tnx.nl>
Tested-by: Juerd Waalboer <juerd@tnx.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 2ea76fad6545a712713de1a09965158805e83c55
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Feb 18 10:14:37 2014 +1000
@ -91,9 +640,8 @@ Date: Tue Feb 18 10:14:37 2014 +1000
X.Org Bug 75074 <http://bugs.freedesktop.org/show_bug.cgi?id=75074>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 2ea76fad6545a712713de1a09965158805e83c55)
commit 0b70c76eab57822526585bbd11a1408bd115f26b
commit 4f543ce1d6ae9ca11086a3009d149505590584a8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Feb 13 14:55:12 2014 +1000
@ -108,9 +656,21 @@ Date: Thu Feb 13 14:55:12 2014 +1000
src/synaptics.c
Acked-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 4f543ce1d6ae9ca11086a3009d149505590584a8)
commit 1bd4ca3b5af6e5ee98c7d7f153fd4ee643c29e1a
commit 5d8cdaf4b1552c12fe6626059b9af4a6da6491e9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 10 08:57:19 2014 +1000
Drop the half-baked test suite
This suite was never really maintained anyway, and it is quite hard to do so
anyway. The driver is linked to the server's API too tightly to easily do
independent testing. We need to re-implement stubs for the API the driver
uses, have to track API changes, etc. Not worth the effort.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit e0069c154440305ece6def92a9813a9f8004b2fb
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Jan 17 08:24:35 2014 +1000
@ -125,35 +685,44 @@ Date: Fri Jan 17 08:24:35 2014 +1000
include/synaptics.h
man/synaptics.man
src/synaptics.c
(cherry picked from commit e0069c154440305ece6def92a9813a9f8004b2fb)
commit 90d93891be0dcc55d87c349ab438144ead818402
commit 48fbf44a3903bc6975add21be35586914a53c310
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Jan 13 15:14:06 2014 +1000
Date: Fri Jan 17 08:18:03 2014 +1000
synaptics 1.7.3
Bump to 1.7.99
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit b227ca373de79fe6852ac09e71465c048790cd5b
commit 51b6bf3c1083638527b18696c2b682fd78c97070
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Dec 16 09:43:40 2013 +1000
On clickpads with two touchpoints, try to detect clickfinger 3 actions
Some touchpads provide BTN_TOOL_TRIPLETAP but do not track more than two
touchpoints. For those, try to detect clickfinger3 actions as best as we can.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9388b54a109bbd634e05611e6c90110d698f13d1)
commit 49fe70e99d1b0932ab915824c78f952a0fdb3ee7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Jan 3 11:23:22 2014 +1000
Fix ABI detection for in-driver scaling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 49fe70e99d1b0932ab915824c78f952a0fdb3ee7)
commit 88d926d12a1f5c06ee2825de5bc4b2222ec29c78
commit 29318c1d94510cfb6d5d712e912af111f99edb42
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Dec 9 11:28:23 2013 +1000
Date: Thu Dec 5 09:31:11 2013 +1000
synaptics 1.7.2
Add missing property handler for the pressure motion factor
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 61243ada3e1e10f6d32a899a6cc595efa244eb25
commit 5d391e352f4e502ada6444a7ce860683e3480fbf
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Dec 4 07:58:26 2013 +1000
@ -162,21 +731,52 @@ Date: Wed Dec 4 07:58:26 2013 +1000
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)
commit 09ac39309fbee01aa047dab1b0f577dc2571cdd1
commit 3b9267e5a67a153675174818114e390e17c61f2d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Dec 5 09:31:11 2013 +1000
Date: Wed Nov 6 10:52:55 2013 +1000
Add missing property handler for the pressure motion factor
Drop edge speed from get_delta
Always 0 anyway, and the feature was purged in
xf86-input-synaptics-1.6.0-8-g54f65f3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 29318c1d94510cfb6d5d712e912af111f99edb42)
commit f4ddbde165843924195b08551d7d6d6200c44b23
commit 0fc2679c4d148f9753e1964d7df8b00dc94401f6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Nov 4 15:23:39 2013 +1000
autogen.sh: support NOCONFIGURE=1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 03b4faeadfb50b26452dd2f494540b0f5a8b7399
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Nov 4 15:22:31 2013 +1000
Drop maintainer mode
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 41840a656f5c790b49fe798b9d99136c23e09a5f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed May 29 15:07:44 2013 +1000
Switch to libevdev for the eventcomm backend
This has a potential bug that would need to be fixed in mtdev first:
if we get a SYN_DROPPED and we miss out on events, the current code emulates a
normal EV_SYN, feeds that to mtdev and hopes that that fills the mtdev output
queue.
If mtdev doesn't generate events on that EV_SYN, we're stuck in limbo and may
get weird results. The loop will continue and sync the device, but there's the
off chance we get odd events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 0fb59b3487d57523a03f078a2061e2ea0cacbc7c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Jul 19 11:08:43 2013 +1000
@ -187,7 +787,6 @@ Date: Fri Jul 19 11:08:43 2013 +1000
scale, so we deactivate those bits in the driver.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0fb59b3487d57523a03f078a2061e2ea0cacbc7c)
commit 96cf04dce19e7c90bc05b8b3b192b5bfb97381d2
Author: Peter Hutterer <peter.hutterer@who-t.net>

View File

@ -24,7 +24,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--with-sdkdir='$${includedir}/xorg' \
--with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d'
SUBDIRS = include src man tools test
SUBDIRS = include src man tools
MAINTAINERCLEANFILES = ChangeLog INSTALL
pkgconfigdir = $(libdir)/pkgconfig

View File

@ -237,6 +237,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBEVDEV_CFLAGS = @LIBEVDEV_CFLAGS@
LIBEVDEV_LIBS = @LIBEVDEV_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -245,15 +247,12 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
MTDEV_CFLAGS = @MTDEV_CFLAGS@
MTDEV_LIBS = @MTDEV_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -348,7 +347,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--with-sdkdir='$${includedir}/xorg' \
--with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d'
SUBDIRS = include src man tools test
SUBDIRS = include src man tools
MAINTAINERCLEANFILES = ChangeLog INSTALL
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-synaptics.pc
@ -358,7 +357,7 @@ all: config.h
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -385,9 +384,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
@ -398,7 +397,7 @@ config.h: stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(srcdir)/config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@

View File

@ -9386,44 +9386,6 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
# Default is to disable them, unless 'enable' is passed literally.
# For symmetry, 'disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
[enable], [m4_define([am_maintainer_other], [disable])],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
am_maintainer_other[ make rules and dependencies not useful
(and sometimes confusing) to the casual installer])],
[USE_MAINTAINER_MODE=$enableval],
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST([MAINT])dnl
]
)
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.

View File

@ -30,6 +30,11 @@
For other possible options, check CONFIGURATION DETAILS in synaptics man page
-->
<merge key="input.x11_options.SoftButtonAreas" type="string">50% 0 82% 0 0 0 0 0</merge>
<merge key="input.x11_options.SecondarySoftButtonAreas" type="string">58% 0 0 8% 42% 58% 0 8%</merge>
<match key="info.product" contains="Apple|bcm5974">
<merge key="input.x11_options.SoftButtonAreas" type="string">0 0 0 0 0 0 0 0</merge>
</match>
</match>
</device>
</deviceinfo>

View File

@ -25,16 +25,15 @@ Section "InputClass"
Option "Ignore" "on"
EndSection
# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
Identifier "Default clickpad buttons"
MatchDriver "synaptics"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
# To disable the bottom edge area so the buttons only work as buttons,
# not for movement, set the AreaBottomEdge
# Option "AreaBottomEdge" "82%"
Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
EndSection
# This option disables software buttons on Apple touchpads.

View File

@ -177,6 +177,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBEVDEV_CFLAGS = @LIBEVDEV_CFLAGS@
LIBEVDEV_LIBS = @LIBEVDEV_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -185,15 +187,12 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
MTDEV_CFLAGS = @MTDEV_CFLAGS@
MTDEV_LIBS = @MTDEV_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -287,7 +286,7 @@ top_srcdir = @top_srcdir@
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -312,9 +311,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for xf86-input-synaptics 1.7.5.
# Generated by GNU Autoconf 2.69 for xf86-input-synaptics 1.8.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xf86-input-synaptics'
PACKAGE_TARNAME='xf86-input-synaptics'
PACKAGE_VERSION='1.7.5'
PACKAGE_STRING='xf86-input-synaptics 1.7.5'
PACKAGE_VERSION='1.8.0'
PACKAGE_STRING='xf86-input-synaptics 1.8.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@ -649,8 +649,8 @@ BUILD_PSMCOMM_FALSE
BUILD_PSMCOMM_TRUE
BUILD_EVENTCOMM_FALSE
BUILD_EVENTCOMM_TRUE
MTDEV_LIBS
MTDEV_CFLAGS
LIBEVDEV_LIBS
LIBEVDEV_CFLAGS
DEBUG_FALSE
DEBUG_TRUE
HAS_XORG_CONF_DIR_FALSE
@ -736,9 +736,6 @@ build_vendor
build_cpu
build
LIBTOOL
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
am__untar
am__tar
AMTAR
@ -803,7 +800,6 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_maintainer_mode
enable_static
enable_shared
with_pic
@ -836,8 +832,8 @@ PKG_CONFIG_LIBDIR
XORG_MALLOC_DEBUG_ENV
XORG_CFLAGS
XORG_LIBS
MTDEV_CFLAGS
MTDEV_LIBS
LIBEVDEV_CFLAGS
LIBEVDEV_LIBS
XI_CFLAGS
XI_LIBS
XTST_CFLAGS
@ -1382,7 +1378,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures xf86-input-synaptics 1.7.5 to adapt to many kinds of systems.
\`configure' configures xf86-input-synaptics 1.8.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1453,7 +1449,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xf86-input-synaptics 1.7.5:";;
short | recursive ) echo "Configuration of xf86-input-synaptics 1.8.0:";;
esac
cat <<\_ACEOF
@ -1461,9 +1457,6 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
--enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-fast-install[=PKGS]
@ -1518,9 +1511,10 @@ Some influential environment variables:
Environment variables to enable memory checking in tests
XORG_CFLAGS C compiler flags for XORG, overriding pkg-config
XORG_LIBS linker flags for XORG, overriding pkg-config
MTDEV_CFLAGS
C compiler flags for MTDEV, overriding pkg-config
MTDEV_LIBS linker flags for MTDEV, overriding pkg-config
LIBEVDEV_CFLAGS
C compiler flags for LIBEVDEV, overriding pkg-config
LIBEVDEV_LIBS
linker flags for LIBEVDEV, overriding pkg-config
XI_CFLAGS C compiler flags for XI, overriding pkg-config
XI_LIBS linker flags for XI, overriding pkg-config
XTST_CFLAGS C compiler flags for XTST, overriding pkg-config
@ -1592,7 +1586,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
xf86-input-synaptics configure 1.7.5
xf86-input-synaptics configure 1.8.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -1916,7 +1910,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xf86-input-synaptics $as_me 1.7.5, which was
It was created by xf86-input-synaptics $as_me 1.8.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -2745,7 +2739,7 @@ fi
# Define the identity of the package.
PACKAGE='xf86-input-synaptics'
VERSION='1.7.5'
VERSION='1.8.0'
cat >>confdefs.h <<_ACEOF
@ -2792,29 +2786,6 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then :
enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
$as_echo "$USE_MAINTAINER_MODE" >&6; }
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
# Initialize libtool
# Check whether --enable-static was given.
if test "${enable_static+set}" = set; then :
@ -17950,22 +17921,20 @@ if test "x$BUILD_EVENTCOMM" = xyes; then
$as_echo "#define BUILD_EVENTCOMM 1" >>confdefs.h
# Obtain compiler/linker options for mtdev
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MTDEV" >&5
$as_echo_n "checking for MTDEV... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEVDEV" >&5
$as_echo_n "checking for LIBEVDEV... " >&6; }
if test -n "$MTDEV_CFLAGS"; then
pkg_cv_MTDEV_CFLAGS="$MTDEV_CFLAGS"
if test -n "$LIBEVDEV_CFLAGS"; then
pkg_cv_LIBEVDEV_CFLAGS="$LIBEVDEV_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mtdev\""; } >&5
($PKG_CONFIG --exists --print-errors "mtdev") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libevdev >= 0.4\""; } >&5
($PKG_CONFIG --exists --print-errors "libevdev >= 0.4") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_MTDEV_CFLAGS=`$PKG_CONFIG --cflags "mtdev" 2>/dev/null`
pkg_cv_LIBEVDEV_CFLAGS=`$PKG_CONFIG --cflags "libevdev >= 0.4" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@ -17973,16 +17942,16 @@ fi
else
pkg_failed=untried
fi
if test -n "$MTDEV_LIBS"; then
pkg_cv_MTDEV_LIBS="$MTDEV_LIBS"
if test -n "$LIBEVDEV_LIBS"; then
pkg_cv_LIBEVDEV_LIBS="$LIBEVDEV_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mtdev\""; } >&5
($PKG_CONFIG --exists --print-errors "mtdev") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libevdev >= 0.4\""; } >&5
($PKG_CONFIG --exists --print-errors "libevdev >= 0.4") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_MTDEV_LIBS=`$PKG_CONFIG --libs "mtdev" 2>/dev/null`
pkg_cv_LIBEVDEV_LIBS=`$PKG_CONFIG --libs "libevdev >= 0.4" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@ -18003,22 +17972,22 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
MTDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mtdev" 2>&1`
LIBEVDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libevdev >= 0.4" 2>&1`
else
MTDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mtdev" 2>&1`
LIBEVDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libevdev >= 0.4" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$MTDEV_PKG_ERRORS" >&5
echo "$LIBEVDEV_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (mtdev) were not met:
as_fn_error $? "Package requirements (libevdev >= 0.4) were not met:
$MTDEV_PKG_ERRORS
$LIBEVDEV_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables MTDEV_CFLAGS
and MTDEV_LIBS to avoid the need to call pkg-config.
Alternatively, you may set the environment variables LIBEVDEV_CFLAGS
and LIBEVDEV_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@ -18029,15 +17998,15 @@ as_fn_error $? "The pkg-config script could not be found or is too old. Make su
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables MTDEV_CFLAGS
and MTDEV_LIBS to avoid the need to call pkg-config.
Alternatively, you may set the environment variables LIBEVDEV_CFLAGS
and LIBEVDEV_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
MTDEV_CFLAGS=$pkg_cv_MTDEV_CFLAGS
MTDEV_LIBS=$pkg_cv_MTDEV_LIBS
LIBEVDEV_CFLAGS=$pkg_cv_LIBEVDEV_CFLAGS
LIBEVDEV_LIBS=$pkg_cv_LIBEVDEV_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@ -18291,7 +18260,7 @@ if test "${with_sdkdir+set}" = set; then :
fi
ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile tools/Makefile conf/Makefile include/Makefile test/Makefile xorg-synaptics.pc"
ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile tools/Makefile conf/Makefile include/Makefile xorg-synaptics.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@ -18418,10 +18387,6 @@ else
am__EXEEXT_FALSE=
fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -18855,7 +18820,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by xf86-input-synaptics $as_me 1.7.5, which was
This file was extended by xf86-input-synaptics $as_me 1.8.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -18921,7 +18886,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
xf86-input-synaptics config.status 1.7.5
xf86-input-synaptics config.status 1.8.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@ -19336,7 +19301,6 @@ do
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
"conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;;
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
"xorg-synaptics.pc") CONFIG_FILES="$CONFIG_FILES xorg-synaptics.pc" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;

View File

@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-synaptics],
[1.7.5],
[1.8.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-synaptics])
AC_CONFIG_SRCDIR([Makefile.am])
@ -32,7 +32,6 @@ AC_CONFIG_AUX_DIR(.)
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
# Initialize libtool
AC_DISABLE_STATIC
@ -121,9 +120,7 @@ case "${host}" in
esac
if test "x$BUILD_EVENTCOMM" = xyes; then
AC_DEFINE(BUILD_EVENTCOMM, 1, [Optional backend eventcomm enabled])
# Obtain compiler/linker options for mtdev
PKG_CHECK_MODULES(MTDEV, mtdev)
PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
fi
if test "x$BUILD_PSMCOMM" = xyes; then
AC_DEFINE(BUILD_PSMCOMM, 1, [Optional backend psmcomm enabled])
@ -168,7 +165,6 @@ AC_CONFIG_FILES([Makefile
tools/Makefile
conf/Makefile
include/Makefile
test/Makefile
xorg-synaptics.pc])
AC_OUTPUT

View File

@ -177,6 +177,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBEVDEV_CFLAGS = @LIBEVDEV_CFLAGS@
LIBEVDEV_LIBS = @LIBEVDEV_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -185,15 +187,12 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
MTDEV_CFLAGS = @MTDEV_CFLAGS@
MTDEV_LIBS = @MTDEV_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -285,7 +284,7 @@ sdk_HEADERS = synaptics-properties.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -310,9 +309,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

View File

@ -152,6 +152,9 @@
/* 32 bit, 4 values, left, right, top, buttom */
#define SYNAPTICS_PROP_SOFTBUTTON_AREAS "Synaptics Soft Button Areas"
/* 32 bit, 4 values, left, right, top, buttom */
#define SYNAPTICS_PROP_SECONDARY_SOFTBUTTON_AREAS "Synaptics Secondary Soft Button Areas"
/* 32 Bit Integer, 2 values, horizontal hysteresis, vertical hysteresis */
#define SYNAPTICS_PROP_NOISE_CANCELLATION "Synaptics Noise Cancellation"

View File

@ -178,6 +178,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBEVDEV_CFLAGS = @LIBEVDEV_CFLAGS@
LIBEVDEV_LIBS = @LIBEVDEV_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -186,15 +188,12 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
MTDEV_CFLAGS = @MTDEV_CFLAGS@
MTDEV_LIBS = @MTDEV_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -298,7 +297,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .$(DRIVER_MAN_SUFFIX) .man .$(APP_MAN_SUFFIX)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -323,9 +322,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

View File

@ -261,9 +261,14 @@ Valid values are:
.TS
l l.
0 Touchpad is enabled
1 Touchpad is switched off
1 Touchpad is switched off (physical clicks still work)
2 Only tapping and scrolling is switched off
.TE
When the touchpad is switched off, button events caused by a physical
button press are still interpreted. On a ClickPad, this includes
software-emulated middle and right buttons as defined by
the SoftButtonAreas setting.
.TP
Property: "Synaptics Off"
.TP
.BI "Option \*qLockedDrags\*q \*q" boolean \*q
@ -441,7 +446,7 @@ Property: "Synaptics Pad Resolution"
.
.TP
.BI "Option \*qAreaLeftEdge\*q \*q" integer \*q
Ignore movements, scrolling and tapping which take place left of this edge.
Ignore movements, scrolling and tapping which start left of this edge.
.
The option is disabled by default and can be enabled by setting the
AreaLeftEdge option to any integer value other than zero. If supported by the
@ -450,7 +455,7 @@ the total width of the touchpad. Property: "Synaptics Area"
.
.TP
.BI "Option \*qAreaRightEdge\*q \*q" integer \*q
Ignore movements, scrolling and tapping which take place right of this edge.
Ignore movements, scrolling and tapping which start right of this edge.
.
The option is disabled by default and can be enabled by setting the
AreaRightEdge option to any integer value other than zero. If supported by the
@ -459,7 +464,7 @@ the total width of the touchpad. Property: "Synaptics Area"
.
.TP
.BI "Option \*qAreaTopEdge\*q \*q" integer \*q
Ignore movements, scrolling and tapping which take place above this edge.
Ignore movements, scrolling and tapping which start above this edge.
.
The option is disabled by default and can be enabled by setting the
AreaTopEdge option to any integer value other than zero. If supported by the
@ -468,7 +473,7 @@ the total height of the touchpad. Property: "Synaptics Area"
.
.TP
.BI "Option \*qAreaBottomEdge\*q \*q" integer \*q
Ignore movements, scrolling and tapping which take place below this edge.
Ignore movements, scrolling and tapping which start below this edge.
.
The option is disabled by default and can be enabled by setting the
AreaBottomEdge option to any integer value other than zero. If supported by the
@ -489,6 +494,30 @@ soft button areas. Button areas may not overlap, however it is permitted for two
buttons to share an edge value.
Property: "Synaptics Soft Button Areas"
.
.TP
.BI "Option \*qHasSecondarySoftButtons\*q \*q" boolean \*q
This option is only available on ClickPad devices.
Enable the secondary software button area support. The exact area must be
set in option \*qSecondarySoftButtonAreas\*q. See
.B ClickPad support
for more details.
.
.TP
.BI "Option \*qSecondarySoftButtonAreas\*q \*q" "RBL RBR RBT RBB MBL MBR MBT MBB" \*q
This option is only available on ClickPad devices and only if
.B Option \*qHasSecondarySoftButtons\*q
is enabled.
Define the secondary soft button click areas on ClickPad devices (usually on
top of the device).
For the allowed values for this option, see
.B Option \*qSoftButtonAreas\*q.
Primary and secondary soft button areas must not overlap each other. If they do,
the behavior of the driver is undefined.
Property: "Synaptics Secondary Soft Button Areas". This property is only
initialized if
.B Option \*qHasSecondarySoftButtons\*q
is enabled and this option is set in the __xconfigfile__(__filemansuffix__).
.
.SH CONFIGURATION DETAILS
.SS Area handling
@ -532,9 +561,10 @@ the touchpad.
.PP
The perceived physical edges may be adjusted with the AreaLeftEdge,
AreaRightEdge, AreaTopEdge, and AreaBottomEdge options. If these values are
set to something other than the physical edges, input in the space between
the area edge and the respective physical edge is ignored. Note that this
reduces the available space on the touchpad.
set to something other than the physical edges, input that starts in the
space between the area edge and the respective physical edge is ignored.
Note that this reduces the available space on the touchpad to start motions
in.
.SS Tapping
A tap event happens when the finger is touched and released in a time
interval shorter than MaxTapTime, and the touch and release
@ -703,10 +733,22 @@ support at runime, the user must also set the middle mouse button timeout to
driver.
.LP
ClickPads provide software emulated buttons through
.B Option SoftButtonAreas.
.B Option \*qSoftButtonAreas\*q.
These buttons enable areas on the touchpad to perform as right or middle
mouse button. When the user performs a click within a defined soft button
area, a right or middle click is performed.
.LP
Some laptops, most notably the Lenovo T440, T540 and x240 series, provide a
pointing stick without physical buttons. On those laptops, the top of the
touchpad acts as software-emulated button area. This area can be enabled
with
.B Option \*qHasSecondarySoftButtons\*q
and configured
with
.B Option \*qSecondarySoftButtonAreas\*q.
On some platforms, this option
will be set automatically if the kernel detects a matching device. On Linux,
the device must have the INPUT_PROP_TOPBUTTONPAD property set.
.SH "DEVICE PROPERTIES"
Synaptics 1.0 and higher support input device properties if the driver is

View File

@ -48,7 +48,8 @@ if BUILD_EVENTCOMM
synaptics_drv_la_SOURCES += \
eventcomm.c eventcomm.h
synaptics_drv_la_LIBADD = \
$(MTDEV_LIBS)
$(LIBEVDEV_LIBS)
AM_CPPFLAGS += $(LIBEVDEV_CFLAGS)
endif
if BUILD_PSMCOMM

View File

@ -77,10 +77,11 @@ host_triplet = @host@
@BUILD_EVENTCOMM_TRUE@am__append_2 = \
@BUILD_EVENTCOMM_TRUE@ eventcomm.c eventcomm.h
@BUILD_PSMCOMM_TRUE@am__append_3 = \
@BUILD_EVENTCOMM_TRUE@am__append_3 = $(LIBEVDEV_CFLAGS)
@BUILD_PSMCOMM_TRUE@am__append_4 = \
@BUILD_PSMCOMM_TRUE@ psmcomm.c
@BUILD_WSCONSCOMM_TRUE@am__append_4 = \
@BUILD_WSCONSCOMM_TRUE@am__append_5 = \
@BUILD_WSCONSCOMM_TRUE@ wsconscomm.c
subdir = src
@ -234,6 +235,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBEVDEV_CFLAGS = @LIBEVDEV_CFLAGS@
LIBEVDEV_LIBS = @LIBEVDEV_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -242,15 +245,12 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
MTDEV_CFLAGS = @MTDEV_CFLAGS@
MTDEV_LIBS = @MTDEV_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -347,19 +347,19 @@ top_srcdir = @top_srcdir@
synaptics_drv_la_LTLIBRARIES = synaptics_drv.la
synaptics_drv_la_LDFLAGS = -module -avoid-version
synaptics_drv_ladir = @inputdir@
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CPPFLAGS = -I$(top_srcdir)/include $(am__append_3)
AM_CFLAGS = $(XORG_CFLAGS)
synaptics_drv_la_SOURCES = synaptics.c synapticsstr.h synproto.c \
synproto.h properties.c $(am__append_1) $(am__append_2) \
$(am__append_3) $(am__append_4)
$(am__append_4) $(am__append_5)
@BUILD_EVENTCOMM_TRUE@synaptics_drv_la_LIBADD = \
@BUILD_EVENTCOMM_TRUE@ $(MTDEV_LIBS)
@BUILD_EVENTCOMM_TRUE@ $(LIBEVDEV_LIBS)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -384,9 +384,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-synaptics_drv_laLTLIBRARIES: $(synaptics_drv_la_LTLIBRARIES)

View File

@ -42,7 +42,7 @@
#include "synproto.h"
#include "synapticsstr.h"
#include <xf86.h>
#include <mtdev.h>
#include <libevdev/libevdev.h>
#ifndef INPUT_PROP_BUTTONPAD
#define INPUT_PROP_BUTTONPAD 0x02
@ -50,6 +50,12 @@
#ifndef INPUT_PROP_SEMI_MT
#define INPUT_PROP_SEMI_MT 0x03
#endif
#ifndef INPUT_PROP_TOPBUTTONPAD
#define INPUT_PROP_TOPBUTTONPAD 0x04
#endif
#ifndef ABS_MT_TOOL_Y
#define ABS_MT_TOOL_Y 0x3d
#endif
#define SYSCALL(call) while (((call) == -1) && (errno == EINTR))
@ -59,6 +65,10 @@
#define LONG(x) ((x) / LONG_BITS)
#define TEST_BIT(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
#define ABS_MT_MIN ABS_MT_SLOT
#define ABS_MT_MAX ABS_MT_TOOL_Y
#define ABS_MT_CNT (ABS_MT_MAX - ABS_MT_MIN + 1)
/**
* Protocol-specific data.
*/
@ -71,18 +81,54 @@ struct eventcomm_proto_data {
BOOL need_grab;
int st_to_mt_offset[2];
double st_to_mt_scale[2];
struct mtdev *mtdev;
int axis_map[MT_ABS_SIZE];
int axis_map[ABS_MT_CNT];
int cur_slot;
ValuatorMask **last_mt_vals;
int num_touches;
int *tracking_ids;
struct libevdev *evdev;
enum libevdev_read_flag read_flag;
};
static void
libevdev_log_func(enum libevdev_log_priority priority,
void *data,
const char *file, int line, const char *func,
const char *format, va_list args)
_X_ATTRIBUTE_PRINTF(6, 0);
static void
libevdev_log_func(enum libevdev_log_priority priority,
void *data,
const char *file, int line, const char *func,
const char *format, va_list args)
{
int verbosity;
switch(priority) {
case LIBEVDEV_LOG_ERROR: verbosity = 0; break;
case LIBEVDEV_LOG_INFO: verbosity = 4; break;
case LIBEVDEV_LOG_DEBUG: verbosity = 10; break;
}
LogVMessageVerbSigSafe(X_NOTICE, verbosity, format, args);
}
static void
set_libevdev_log_handler(void)
{
/* be quiet, gcc *handwave* */
libevdev_set_log_function((libevdev_log_func_t)libevdev_log_func, NULL);
libevdev_set_log_priority(LIBEVDEV_LOG_DEBUG);
}
struct eventcomm_proto_data *
EventProtoDataAlloc(void)
EventProtoDataAlloc(int fd)
{
struct eventcomm_proto_data *proto_data;
int rc;
set_libevdev_log_handler();
proto_data = calloc(1, sizeof(struct eventcomm_proto_data));
if (!proto_data)
@ -91,19 +137,16 @@ EventProtoDataAlloc(void)
proto_data->st_to_mt_scale[0] = 1;
proto_data->st_to_mt_scale[1] = 1;
rc = libevdev_new_from_fd(fd, &proto_data->evdev);
if (rc < 0) {
free(proto_data);
proto_data = NULL;
} else
proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
return proto_data;
}
static int
last_mt_vals_slot(const SynapticsPrivate * priv)
{
struct eventcomm_proto_data *proto_data =
(struct eventcomm_proto_data *) priv->proto_data;
int value = proto_data->cur_slot;
return value < priv->num_slots ? value : -1;
}
static void
UninitializeTouch(InputInfoPtr pInfo)
{
@ -123,12 +166,7 @@ UninitializeTouch(InputInfoPtr pInfo)
proto_data->last_mt_vals = NULL;
}
mtdev_close_delete(proto_data->mtdev);
proto_data->mtdev = NULL;
proto_data->num_touches = 0;
free(proto_data->tracking_ids);
proto_data->tracking_ids = NULL;
}
static void
@ -142,14 +180,7 @@ InitializeTouch(InputInfoPtr pInfo)
if (!priv->has_touch)
return;
proto_data->mtdev = mtdev_new_open(pInfo->fd);
if (!proto_data->mtdev) {
xf86IDrvMsg(pInfo, X_WARNING,
"failed to create mtdev instance, ignoring touch events\n");
return;
}
proto_data->cur_slot = proto_data->mtdev->caps.slot.value;
proto_data->cur_slot = libevdev_get_current_slot(proto_data->evdev);
proto_data->num_touches = 0;
proto_data->last_mt_vals = calloc(priv->num_slots, sizeof(ValuatorMask *));
@ -160,18 +191,9 @@ InitializeTouch(InputInfoPtr pInfo)
return;
}
proto_data->tracking_ids = calloc(priv->num_slots, sizeof(int));
if (!proto_data->tracking_ids) {
xf86IDrvMsg(pInfo, X_WARNING, "failed to allocate tracking ID array\n");
UninitializeTouch(pInfo);
return;
}
for (i = 0; i < priv->num_slots; i++) {
int j;
proto_data->tracking_ids[i] = -1;
proto_data->last_mt_vals[i] = valuator_mask_new(4 + priv->num_mt_axes);
if (!proto_data->last_mt_vals[i]) {
xf86IDrvMsg(pInfo, X_WARNING,
@ -196,14 +218,32 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para)
struct eventcomm_proto_data *proto_data =
(struct eventcomm_proto_data *) priv->proto_data;
set_libevdev_log_handler();
if (libevdev_get_fd(proto_data->evdev) != -1) {
struct input_event ev;
libevdev_change_fd(proto_data->evdev, pInfo->fd);
/* re-sync libevdev's state, but we don't care about the actual
events here */
libevdev_next_event(proto_data->evdev, LIBEVDEV_READ_FLAG_FORCE_SYNC, &ev);
while (libevdev_next_event(proto_data->evdev,
LIBEVDEV_READ_FLAG_SYNC, &ev) == LIBEVDEV_READ_STATUS_SYNC)
;
} else
libevdev_set_fd(proto_data->evdev, pInfo->fd);
if (para->grab_event_device) {
/* Try to grab the event device so that data don't leak to /dev/input/mice */
int ret;
SYSCALL(ret = ioctl(pInfo->fd, EVIOCGRAB, (pointer) 1));
ret = libevdev_grab(proto_data->evdev, LIBEVDEV_GRAB);
if (ret < 0) {
xf86IDrvMsg(pInfo, X_WARNING, "can't grab event device, errno=%d\n",
errno);
-ret);
return FALSE;
}
}
@ -218,8 +258,13 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para)
static Bool
EventDeviceOffHook(InputInfoPtr pInfo)
{
SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
struct eventcomm_proto_data *proto_data = priv->proto_data;
UninitializeTouch(pInfo);
SYSCALL(ioctl(pInfo->fd, EVIOCGRAB, (pointer) 0));
libevdev_grab(proto_data->evdev, LIBEVDEV_UNGRAB);
libevdev_set_log_function(NULL, NULL);
libevdev_set_log_priority(LIBEVDEV_LOG_INFO); /* reset to default */
return Success;
}
@ -232,59 +277,48 @@ EventDeviceOffHook(InputInfoPtr pInfo)
* - BTN_TOOL_FINGER
* - BTN_TOOL_PEN is _not_ set
*
* @param fd The file descriptor to an event device.
* @param evdev Libevdev handle
* @param test_grab If true, test whether an EVIOCGRAB is possible on the
* device. A failure to grab the event device returns in a failure.
*
* @return TRUE if the device is a touchpad or FALSE otherwise.
*/
static Bool
event_query_is_touchpad(int fd, BOOL test_grab)
event_query_is_touchpad(struct libevdev *evdev, BOOL test_grab)
{
int ret = FALSE, rc;
unsigned long evbits[NBITS(EV_MAX)] = { 0 };
unsigned long absbits[NBITS(ABS_MAX)] = { 0 };
unsigned long keybits[NBITS(KEY_MAX)] = { 0 };
if (test_grab) {
SYSCALL(rc = ioctl(fd, EVIOCGRAB, (pointer) 1));
rc = libevdev_grab(evdev, LIBEVDEV_GRAB);
if (rc < 0)
return FALSE;
}
/* Check for ABS_X, ABS_Y, ABS_PRESSURE and BTN_TOOL_FINGER */
SYSCALL(rc = ioctl(fd, EVIOCGBIT(0, sizeof(evbits)), evbits));
if (rc < 0)
goto unwind;
if (!TEST_BIT(EV_SYN, evbits) ||
!TEST_BIT(EV_ABS, evbits) || !TEST_BIT(EV_KEY, evbits))
if (!libevdev_has_event_type(evdev, EV_SYN) ||
!libevdev_has_event_type(evdev, EV_ABS) ||
!libevdev_has_event_type(evdev, EV_KEY))
goto unwind;
SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbits)), absbits));
if (rc < 0)
goto unwind;
if (!TEST_BIT(ABS_X, absbits) || !TEST_BIT(ABS_Y, absbits))
goto unwind;
SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits));
if (rc < 0)
if (!libevdev_has_event_code(evdev, EV_ABS, ABS_X) ||
!libevdev_has_event_code(evdev, EV_ABS, ABS_Y))
goto unwind;
/* we expect touchpad either report raw pressure or touches */
if (!TEST_BIT(ABS_PRESSURE, absbits) && !TEST_BIT(BTN_TOUCH, keybits))
if (!libevdev_has_event_code(evdev, EV_KEY, BTN_TOUCH) &&
!libevdev_has_event_code(evdev, EV_ABS, ABS_PRESSURE))
goto unwind;
/* all Synaptics-like touchpad report BTN_TOOL_FINGER */
if (!TEST_BIT(BTN_TOOL_FINGER, keybits))
if (!libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_FINGER) ||
libevdev_has_event_code(evdev, EV_ABS, BTN_TOOL_PEN)) /* Don't match wacom tablets */
goto unwind;
if (TEST_BIT(BTN_TOOL_PEN, keybits))
goto unwind; /* Don't match wacom tablets */
ret = TRUE;
unwind:
if (test_grab)
SYSCALL(ioctl(fd, EVIOCGRAB, (pointer) 0));
libevdev_grab(evdev, LIBEVDEV_UNGRAB);
return (ret == TRUE);
}
@ -303,7 +337,9 @@ static struct model_lookup_t model_lookup_table[] = {
{0x0002, 0x0007, 0x0007, MODEL_SYNAPTICS},
{0x0002, 0x0008, 0x0008, MODEL_ALPS},
{0x05ac, PRODUCT_ANY, 0x222, MODEL_APPLETOUCH},
{0x05ac, 0x223, PRODUCT_ANY, MODEL_UNIBODY_MACBOOK},
{0x05ac, 0x223, 0x228, MODEL_UNIBODY_MACBOOK},
{0x05ac, 0x229, 0x22b, MODEL_APPLETOUCH},
{0x05ac, 0x22c, PRODUCT_ANY, MODEL_UNIBODY_MACBOOK},
{0x0002, 0x000e, 0x000e, MODEL_ELANTECH},
{0x0, 0x0, 0x0, 0x0}
};
@ -319,29 +355,27 @@ static struct model_lookup_t model_lookup_table[] = {
* @return TRUE on success or FALSE otherwise.
*/
static Bool
event_query_model(int fd, enum TouchpadModel *model_out,
event_query_model(struct libevdev *evdev, enum TouchpadModel *model_out,
unsigned short *vendor_id, unsigned short *product_id)
{
struct input_id id;
int rc;
int vendor, product;
struct model_lookup_t *model_lookup;
SYSCALL(rc = ioctl(fd, EVIOCGID, &id));
if (rc < 0)
return FALSE;
vendor = libevdev_get_id_vendor(evdev);
product = libevdev_get_id_product(evdev);
for (model_lookup = model_lookup_table; model_lookup->vendor;
model_lookup++) {
if (model_lookup->vendor == id.vendor &&
if (model_lookup->vendor == vendor &&
(model_lookup->product_start == PRODUCT_ANY ||
model_lookup->product_start <= id.product) &&
model_lookup->product_start <= product) &&
(model_lookup->product_end == PRODUCT_ANY ||
model_lookup->product_end >= id.product))
model_lookup->product_end >= product))
*model_out = model_lookup->model;
}
*vendor_id = id.vendor;
*product_id = id.product;
*vendor_id = vendor;
*product_id = product;
return TRUE;
}
@ -361,27 +395,21 @@ event_query_model(int fd, enum TouchpadModel *model_out,
* @return Zero on success, or errno otherwise.
*/
static int
event_get_abs(InputInfoPtr pInfo, int fd, int code,
event_get_abs(struct libevdev *evdev, int code,
int *min, int *max, int *fuzz, int *res)
{
int rc;
struct input_absinfo abs = { 0 };
const struct input_absinfo *abs;
SYSCALL(rc = ioctl(fd, EVIOCGABS(code), &abs));
if (rc < 0) {
xf86IDrvMsg(pInfo, X_ERROR, "%s EVIOCGABS error on %d (%s)\n",
__func__, code, strerror(errno));
return errno;
}
abs = libevdev_get_abs_info(evdev, code);
*min = abs->minimum;
*max = abs->maximum;
*min = abs.minimum;
*max = abs.maximum;
/* We dont trust a zero fuzz as it probably is just a lazy value */
if (fuzz && abs.fuzz > 0)
*fuzz = abs.fuzz;
if (fuzz && abs->fuzz > 0)
*fuzz = abs->fuzz;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
if (res)
*res = abs.resolution;
*res = abs->resolution;
#endif
return 0;
@ -393,36 +421,25 @@ event_query_axis_ranges(InputInfoPtr pInfo)
{
SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
struct eventcomm_proto_data *proto_data = priv->proto_data;
unsigned long absbits[NBITS(ABS_MAX)] = { 0 };
unsigned long keybits[NBITS(KEY_MAX)] = { 0 };
char buf[256] = { 0 };
int rc;
/* The kernel's fuzziness concept seems a bit weird, but it can more or
* less be applied as hysteresis directly, i.e. no factor here. */
event_get_abs(pInfo, pInfo->fd, ABS_X, &priv->minx, &priv->maxx,
event_get_abs(proto_data->evdev, ABS_X, &priv->minx, &priv->maxx,
&priv->synpara.hyst_x, &priv->resx);
event_get_abs(pInfo, pInfo->fd, ABS_Y, &priv->miny, &priv->maxy,
event_get_abs(proto_data->evdev, ABS_Y, &priv->miny, &priv->maxy,
&priv->synpara.hyst_y, &priv->resy);
priv->has_pressure = FALSE;
priv->has_width = FALSE;
SYSCALL(rc = ioctl(pInfo->fd, EVIOCGBIT(EV_ABS, sizeof(absbits)), absbits));
if (rc >= 0) {
priv->has_pressure = (TEST_BIT(ABS_PRESSURE, absbits) != 0);
priv->has_width = (TEST_BIT(ABS_TOOL_WIDTH, absbits) != 0);
}
else
xf86IDrvMsg(pInfo, X_ERROR, "failed to query ABS bits (%s)\n",
strerror(errno));
priv->has_pressure = libevdev_has_event_code(proto_data->evdev, EV_ABS, ABS_PRESSURE);
priv->has_width = libevdev_has_event_code(proto_data->evdev, EV_ABS, ABS_TOOL_WIDTH);
if (priv->has_pressure)
event_get_abs(pInfo, pInfo->fd, ABS_PRESSURE, &priv->minp, &priv->maxp,
event_get_abs(proto_data->evdev, ABS_PRESSURE, &priv->minp, &priv->maxp,
NULL, NULL);
if (priv->has_width)
event_get_abs(pInfo, pInfo->fd, ABS_TOOL_WIDTH,
event_get_abs(proto_data->evdev, ABS_TOOL_WIDTH,
&priv->minw, &priv->maxw, NULL, NULL);
if (priv->has_touch) {
@ -431,9 +448,9 @@ event_query_axis_ranges(InputInfoPtr pInfo)
int st_miny = priv->miny;
int st_maxy = priv->maxy;
event_get_abs(pInfo, pInfo->fd, ABS_MT_POSITION_X, &priv->minx,
event_get_abs(proto_data->evdev, ABS_MT_POSITION_X, &priv->minx,
&priv->maxx, &priv->synpara.hyst_x, &priv->resx);
event_get_abs(pInfo, pInfo->fd, ABS_MT_POSITION_Y, &priv->miny,
event_get_abs(proto_data->evdev, ABS_MT_POSITION_Y, &priv->miny,
&priv->maxy, &priv->synpara.hyst_y, &priv->resy);
proto_data->st_to_mt_offset[0] = priv->minx - st_minx;
@ -444,19 +461,17 @@ event_query_axis_ranges(InputInfoPtr pInfo)
(priv->maxy - priv->miny) / (st_maxy - st_miny);
}
SYSCALL(rc = ioctl(pInfo->fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits));
if (rc >= 0) {
priv->has_left = (TEST_BIT(BTN_LEFT, keybits) != 0);
priv->has_right = (TEST_BIT(BTN_RIGHT, keybits) != 0);
priv->has_middle = (TEST_BIT(BTN_MIDDLE, keybits) != 0);
priv->has_double = (TEST_BIT(BTN_TOOL_DOUBLETAP, keybits) != 0);
priv->has_triple = (TEST_BIT(BTN_TOOL_TRIPLETAP, keybits) != 0);
priv->has_left = libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_LEFT);
priv->has_right = libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_RIGHT);
priv->has_middle = libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_MIDDLE);
priv->has_double = libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_TOOL_DOUBLETAP);
priv->has_triple = libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_TOOL_TRIPLETAP);
if ((TEST_BIT(BTN_0, keybits) != 0) ||
(TEST_BIT(BTN_1, keybits) != 0) ||
(TEST_BIT(BTN_2, keybits) != 0) || (TEST_BIT(BTN_3, keybits) != 0))
priv->has_scrollbuttons = 1;
}
if (libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_0) ||
libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_1) ||
libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_2) ||
libevdev_has_event_code(proto_data->evdev, EV_KEY, BTN_3))
priv->has_scrollbuttons = 1;
/* Now print the device information */
xf86IDrvMsg(pInfo, X_PROBED, "x-axis range %d - %d (res %d)\n",
@ -497,8 +512,8 @@ EventQueryHardware(InputInfoPtr pInfo)
SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
struct eventcomm_proto_data *proto_data = priv->proto_data;
if (!event_query_is_touchpad
(pInfo->fd, (proto_data) ? proto_data->need_grab : TRUE))
if (!event_query_is_touchpad(proto_data->evdev,
(proto_data) ? proto_data->need_grab : TRUE))
return FALSE;
xf86IDrvMsg(pInfo, X_PROBED, "touchpad found\n");
@ -511,27 +526,36 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev)
{
SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
struct eventcomm_proto_data *proto_data = priv->proto_data;
int rc = TRUE;
ssize_t len;
int rc;
static struct timeval last_event_time;
if (proto_data->mtdev)
len = mtdev_get(proto_data->mtdev, pInfo->fd, ev, 1) *
sizeof(struct input_event);
else
len = read(pInfo->fd, ev, sizeof(*ev));
if (len <= 0) {
/* We use X_NONE here because it doesn't alloc */
if (errno != EAGAIN)
rc = libevdev_next_event(proto_data->evdev, proto_data->read_flag, ev);
if (rc < 0) {
if (rc != -EAGAIN) {
LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error %d\n", pInfo->name,
errno);
rc = FALSE;
errno);
} else if (proto_data->read_flag == LIBEVDEV_READ_FLAG_SYNC) {
proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
return SynapticsReadEvent(pInfo, ev);
}
return FALSE;
}
else if (len % sizeof(*ev)) {
LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error, invalid number of bytes.",
pInfo->name);
rc = FALSE;
}
return rc;
/* SYN_DROPPED received in normal mode. Create a normal EV_SYN
so we process what's in the queue atm, then ensure we sync
next time */
if (rc == LIBEVDEV_READ_STATUS_SYNC &&
proto_data->read_flag == LIBEVDEV_READ_FLAG_NORMAL) {
proto_data->read_flag = LIBEVDEV_READ_FLAG_SYNC;
ev->type = EV_SYN;
ev->code = SYN_REPORT;
ev->value = 0;
ev->time = last_event_time;
} else if (ev->type == EV_SYN)
last_event_time = ev->time;
return TRUE;
}
static Bool
@ -560,7 +584,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
proto_data->cur_slot = ev->value;
}
else {
int slot_index = last_mt_vals_slot(priv);
int slot_index = proto_data->cur_slot;
if (slot_index < 0)
return;
@ -568,24 +592,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
if (hw->slot_state[slot_index] == SLOTSTATE_OPEN_EMPTY)
hw->slot_state[slot_index] = SLOTSTATE_UPDATE;
if (ev->code == ABS_MT_TRACKING_ID) {
int old_tracking_id = proto_data->tracking_ids[slot_index];
/* We don't have proper SYN_DROPPED handling in
synaptics < 1.8. This is a poor man's version that covers the
worst bug we're seeing: touch points starting/stopping during
SYN_DROPPED. There can only be one touchpoint per slot,
identified by the tracking ID. Make sure that we only ever
have a single touch point open per slot.
*/
if (ev->value != -1 && old_tracking_id != -1) {
/* Our touch terminated during SYN_DROPPED, now we have a
new touch starting in the same slot but ours is still
open. Do nothing, just continue with the old touch */
} else if (ev->value == -1 && old_tracking_id == -1) {
/* A new touch started during SYN_DROPPED, now we have that
touch terminating. Do nothing, we don't have that touch
open */
} else if (ev->value >= 0) {
if (ev->value >= 0) {
hw->slot_state[slot_index] = SLOTSTATE_OPEN;
proto_data->num_touches++;
valuator_mask_copy(hw->mt_mask[slot_index],
@ -595,8 +602,6 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
hw->slot_state[slot_index] = SLOTSTATE_CLOSE;
proto_data->num_touches--;
}
proto_data->tracking_ids[slot_index] = ev->value;
}
else {
ValuatorMask *mask = proto_data->last_mt_vals[slot_index];
@ -661,13 +666,18 @@ EventReadHwState(InputInfoPtr pInfo,
SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
SynapticsParameters *para = &priv->synpara;
struct eventcomm_proto_data *proto_data = priv->proto_data;
Bool sync_cumulative = FALSE;
set_libevdev_log_handler();
SynapticsResetTouchHwState(hw, FALSE);
/* Reset cumulative values if buttons were not previously pressed */
if (!hw->left && !hw->right && !hw->middle) {
/* Reset cumulative values if buttons were not previously pressed,
* or no finger was previously present. */
if ((!hw->left && !hw->right && !hw->middle) || hw->z < para->finger_low) {
hw->cumulative_dx = hw->x;
hw->cumulative_dy = hw->y;
sync_cumulative = TRUE;
}
while (SynapticsReadEvent(pInfo, &ev)) {
@ -743,9 +753,13 @@ EventReadHwState(InputInfoPtr pInfo,
switch (ev.code) {
case ABS_X:
hw->x = apply_st_scaling(proto_data, ev.value, 0);
if (sync_cumulative)
hw->cumulative_dx = hw->x;
break;
case ABS_Y:
hw->y = apply_st_scaling(proto_data, ev.value, 1);
if (sync_cumulative)
hw->cumulative_dy = hw->y;
break;
case ABS_PRESSURE:
hw->z = ev.value;
@ -776,49 +790,46 @@ event_query_touch(InputInfoPtr pInfo)
SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
SynapticsParameters *para = &priv->synpara;
struct eventcomm_proto_data *proto_data = priv->proto_data;
struct mtdev *mtdev;
int i;
int rc;
uint8_t prop;
struct libevdev *dev = proto_data->evdev;
int axis;
priv->max_touches = 0;
priv->num_mt_axes = 0;
#ifdef EVIOCGPROP
SYSCALL(rc = ioctl(pInfo->fd, EVIOCGPROP(sizeof(prop)), &prop));
if (rc >= 0 && BitIsOn(&prop, INPUT_PROP_SEMI_MT)) {
if (libevdev_has_property(dev, INPUT_PROP_SEMI_MT)) {
xf86IDrvMsg(pInfo, X_INFO,
"ignoring touch events for semi-multitouch device\n");
priv->has_semi_mt = TRUE;
}
if (rc >= 0 && BitIsOn(&prop, INPUT_PROP_BUTTONPAD)) {
if (libevdev_has_property(dev, INPUT_PROP_BUTTONPAD)) {
xf86IDrvMsg(pInfo, X_INFO, "found clickpad property\n");
para->clickpad = TRUE;
}
if (libevdev_has_property(dev, INPUT_PROP_TOPBUTTONPAD)) {
xf86IDrvMsg(pInfo, X_INFO, "found top buttonpad property\n");
para->has_secondary_buttons = TRUE;
}
#endif
mtdev = mtdev_new_open(pInfo->fd);
if (!mtdev) {
xf86IDrvMsg(pInfo, X_WARNING,
"failed to open mtdev when querying touch capabilities\n");
return;
}
for (i = 0; i < MT_ABS_SIZE; i++) {
if (mtdev->caps.has_abs[i]) {
switch (i) {
/* X and Y axis info is handed by synaptics already */
case ABS_MT_POSITION_X - ABS_MT_TOUCH_MAJOR:
case ABS_MT_POSITION_Y - ABS_MT_TOUCH_MAJOR:
/* Skip tracking ID info */
case ABS_MT_TRACKING_ID - ABS_MT_TOUCH_MAJOR:
break;
default:
priv->num_mt_axes++;
break;
}
if (libevdev_has_event_code(dev, EV_ABS, ABS_MT_SLOT)) {
for (axis = ABS_MT_SLOT + 1; axis <= ABS_MT_MAX; axis++) {
if (!libevdev_has_event_code(dev, EV_ABS, axis))
continue;
priv->has_touch = TRUE;
/* X and Y axis info is handled by synaptics already and we don't
expose the tracking ID */
if (axis == ABS_MT_POSITION_X ||
axis == ABS_MT_POSITION_Y ||
axis == ABS_MT_TRACKING_ID)
continue;
priv->num_mt_axes++;
}
}
@ -839,52 +850,49 @@ event_query_touch(InputInfoPtr pInfo)
AXIS_LABEL_PROP_ABS_MT_PRESSURE,
};
if (mtdev->caps.slot.maximum > 0)
priv->max_touches = mtdev->caps.slot.maximum + 1;
priv->max_touches = libevdev_get_num_slots(dev);
priv->touch_axes = malloc(priv->num_mt_axes *
sizeof(SynapticsTouchAxisRec));
if (!priv->touch_axes) {
priv->has_touch = FALSE;
goto out;
return;
}
axnum = 0;
for (i = 0; i < MT_ABS_SIZE; i++) {
if (mtdev->caps.has_abs[i]) {
switch (i) {
/* X and Y axis info is handed by synaptics already, we just
* need to map the evdev codes to the valuator numbers */
case ABS_MT_POSITION_X - ABS_MT_TOUCH_MAJOR:
proto_data->axis_map[i] = 0;
for (axis = ABS_MT_SLOT + 1; axis <= ABS_MT_MAX; axis++) {
int axis_idx = axis - ABS_MT_TOUCH_MAJOR;
if (!libevdev_has_event_code(dev, EV_ABS, axis))
continue;
switch (axis) {
/* X and Y axis info is handled by synaptics already, we just
* need to map the evdev codes to the valuator numbers */
case ABS_MT_POSITION_X:
proto_data->axis_map[axis_idx] = 0;
break;
case ABS_MT_POSITION_Y - ABS_MT_TOUCH_MAJOR:
proto_data->axis_map[i] = 1;
case ABS_MT_POSITION_Y:
proto_data->axis_map[axis_idx] = 1;
break;
/* Skip tracking ID info */
case ABS_MT_TRACKING_ID - ABS_MT_TOUCH_MAJOR:
case ABS_MT_TRACKING_ID:
break;
default:
priv->touch_axes[axnum].label = labels[i];
priv->touch_axes[axnum].min = mtdev->caps.abs[i].minimum;
priv->touch_axes[axnum].max = mtdev->caps.abs[i].maximum;
priv->touch_axes[axnum].label = labels[axis_idx];
priv->touch_axes[axnum].min = libevdev_get_abs_minimum(dev, axis);
priv->touch_axes[axnum].max = libevdev_get_abs_maximum(dev, axis);
/* Kernel provides units/mm, X wants units/m */
priv->touch_axes[axnum].res =
mtdev->caps.abs[i].resolution * 1000;
priv->touch_axes[axnum].res = libevdev_get_abs_resolution(dev, axis) * 1000;
/* Valuators 0-3 are used for X, Y, and scrolling */
proto_data->axis_map[i] = 4 + axnum;
proto_data->axis_map[axis_idx] = 4 + axnum;
axnum++;
break;
}
}
}
}
out:
mtdev_close_delete(mtdev);
}
/**
@ -897,18 +905,18 @@ EventReadDevDimensions(InputInfoPtr pInfo)
struct eventcomm_proto_data *proto_data = priv->proto_data;
int i;
proto_data = EventProtoDataAlloc();
proto_data = EventProtoDataAlloc(pInfo->fd);
priv->proto_data = proto_data;
for (i = 0; i < MT_ABS_SIZE; i++)
for (i = 0; i < ABS_MT_CNT; i++)
proto_data->axis_map[i] = -1;
proto_data->cur_slot = -1;
if (event_query_is_touchpad(pInfo->fd, proto_data->need_grab)) {
if (event_query_is_touchpad(proto_data->evdev, proto_data->need_grab)) {
event_query_touch(pInfo);
event_query_axis_ranges(pInfo);
}
event_query_model(pInfo->fd, &priv->model, &priv->id_vendor,
event_query_model(proto_data->evdev, &priv->model, &priv->id_vendor,
&priv->id_product);
xf86IDrvMsg(pInfo, X_PROBED, "Vendor %#hx Product %#hx\n",
@ -927,11 +935,24 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
if (device) {
int fd = -1;
SYSCALL(fd = open(device, O_RDONLY));
if (fd >= 0) {
touchpad_found = event_query_is_touchpad(fd, TRUE);
if (pInfo->flags & XI86_SERVER_FD)
fd = pInfo->fd;
else
SYSCALL(fd = open(device, O_RDONLY));
if (fd >= 0) {
int rc;
struct libevdev *evdev;
rc = libevdev_new_from_fd(fd, &evdev);
if (rc >= 0) {
touchpad_found = event_query_is_touchpad(evdev, TRUE);
libevdev_free(evdev);
}
if (!(pInfo->flags & XI86_SERVER_FD))
SYSCALL(close(fd));
SYSCALL(close(fd));
/* if a device is set and not a touchpad (or already grabbed),
* we must return FALSE. Otherwise, we'll add a device that
* wasn't requested for and repeat
@ -957,17 +978,25 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
int fd = -1;
if (!touchpad_found) {
int rc;
struct libevdev *evdev;
sprintf(fname, "%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
SYSCALL(fd = open(fname, O_RDONLY));
if (fd < 0)
continue;
if (event_query_is_touchpad(fd, TRUE)) {
touchpad_found = TRUE;
xf86IDrvMsg(pInfo, X_PROBED, "auto-dev sets device to %s\n",
fname);
pInfo->options =
xf86ReplaceStrOption(pInfo->options, "Device", fname);
rc = libevdev_new_from_fd(fd, &evdev);
if (rc >= 0) {
touchpad_found = event_query_is_touchpad(evdev, TRUE);
libevdev_free(evdev);
if (touchpad_found) {
xf86IDrvMsg(pInfo, X_PROBED, "auto-dev sets device to %s\n",
fname);
pInfo->options = xf86ReplaceStrOption(pInfo->options,
"Device",
fname);
}
}
SYSCALL(close(fd));
}

View File

@ -38,7 +38,7 @@
struct eventcomm_proto_data;
extern struct eventcomm_proto_data *EventProtoDataAlloc(void);
extern struct eventcomm_proto_data *EventProtoDataAlloc(int fd);
extern Bool
EventReadHwState(InputInfoPtr pInfo,

View File

@ -91,6 +91,7 @@ Atom prop_capabilities = 0;
Atom prop_resolution = 0;
Atom prop_area = 0;
Atom prop_softbutton_areas = 0;
Atom prop_secondary_softbutton_areas = 0;
Atom prop_noise_cancellation = 0;
Atom prop_product_id = 0;
Atom prop_device_node = 0;
@ -164,16 +165,33 @@ InitSoftButtonProperty(InputInfoPtr pInfo)
SynapticsParameters *para = &priv->synpara;
int values[8];
values[0] = para->softbutton_areas[0][0];
values[1] = para->softbutton_areas[0][1];
values[2] = para->softbutton_areas[0][2];
values[3] = para->softbutton_areas[0][3];
values[4] = para->softbutton_areas[1][0];
values[5] = para->softbutton_areas[1][1];
values[6] = para->softbutton_areas[1][2];
values[7] = para->softbutton_areas[1][3];
values[0] = para->softbutton_areas[BOTTOM_RIGHT_BUTTON_AREA][LEFT];
values[1] = para->softbutton_areas[BOTTOM_RIGHT_BUTTON_AREA][RIGHT];
values[2] = para->softbutton_areas[BOTTOM_RIGHT_BUTTON_AREA][TOP];
values[3] = para->softbutton_areas[BOTTOM_RIGHT_BUTTON_AREA][BOTTOM];
values[4] = para->softbutton_areas[BOTTOM_MIDDLE_BUTTON_AREA][LEFT];
values[5] = para->softbutton_areas[BOTTOM_MIDDLE_BUTTON_AREA][RIGHT];
values[6] = para->softbutton_areas[BOTTOM_MIDDLE_BUTTON_AREA][TOP];
values[7] = para->softbutton_areas[BOTTOM_MIDDLE_BUTTON_AREA][BOTTOM];
prop_softbutton_areas =
InitAtom(pInfo->dev, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 8, values);
if (!para->has_secondary_buttons)
return;
values[0] = para->softbutton_areas[TOP_RIGHT_BUTTON_AREA][LEFT];
values[1] = para->softbutton_areas[TOP_RIGHT_BUTTON_AREA][RIGHT];
values[2] = para->softbutton_areas[TOP_RIGHT_BUTTON_AREA][TOP];
values[3] = para->softbutton_areas[TOP_RIGHT_BUTTON_AREA][BOTTOM];
values[4] = para->softbutton_areas[TOP_MIDDLE_BUTTON_AREA][LEFT];
values[5] = para->softbutton_areas[TOP_MIDDLE_BUTTON_AREA][RIGHT];
values[6] = para->softbutton_areas[TOP_MIDDLE_BUTTON_AREA][TOP];
values[7] = para->softbutton_areas[TOP_MIDDLE_BUTTON_AREA][BOTTOM];
if (values[0] || values[1] || values[2] || values[4] ||
values[5] || values[6] || values[7])
prop_secondary_softbutton_areas =
InitAtom(pInfo->dev, SYNAPTICS_PROP_SECONDARY_SOFTBUTTON_AREAS, 32, 8, values);
}
void
@ -768,8 +786,21 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
if (!SynapticsIsSoftButtonAreasValid(areas))
return BadValue;
memcpy(para->softbutton_areas[0], areas, 4 * sizeof(int));
memcpy(para->softbutton_areas[1], areas + 4, 4 * sizeof(int));
memcpy(para->softbutton_areas[BOTTOM_RIGHT_BUTTON_AREA], areas, 4 * sizeof(int));
memcpy(para->softbutton_areas[BOTTOM_MIDDLE_BUTTON_AREA], areas + 4, 4 * sizeof(int));
}
else if (property == prop_secondary_softbutton_areas) {
int *areas;
if (prop->size != 8 || prop->format != 32 || prop->type != XA_INTEGER)
return BadMatch;
areas = (int *) prop->data;
if (!SynapticsIsSoftButtonAreasValid(areas))
return BadValue;
memcpy(para->softbutton_areas[TOP_RIGHT_BUTTON_AREA], areas, 4 * sizeof(int));
memcpy(para->softbutton_areas[TOP_MIDDLE_BUTTON_AREA], areas + 4, 4 * sizeof(int));
}
else if (property == prop_noise_cancellation) {
INT32 *hyst;

View File

@ -171,6 +171,10 @@ InputDriverRec SYNAPTICS = {
SynapticsPreInit,
SynapticsUnInit,
NULL,
NULL,
#ifdef XI86_DRV_CAP_SERVER_FD
XI86_DRV_CAP_SERVER_FD
#endif
};
static XF86ModuleVersionInfo VersionRec = {
@ -202,6 +206,15 @@ _X_EXPORT XF86ModuleData synapticsModuleData = {
/*****************************************************************************
* Function Definitions
****************************************************************************/
static inline void
SynapticsCloseFd(InputInfoPtr pInfo)
{
if (pInfo->fd > -1 && !(pInfo->flags & XI86_SERVER_FD)) {
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
}
}
/**
* Fill in default dimensions for backends that cannot query the hardware.
* Eventually, we want the edges to be 1900/5400 for x, 1900/4000 for y.
@ -455,7 +468,7 @@ SynapticsIsSoftButtonAreasValid(int *values)
}
static void
set_softbutton_areas_option(InputInfoPtr pInfo)
set_softbutton_areas_option(InputInfoPtr pInfo, char *option_name, int offset)
{
SynapticsPrivate *priv = pInfo->private;
SynapticsParameters *pars = &priv->synpara;
@ -470,7 +483,7 @@ set_softbutton_areas_option(InputInfoPtr pInfo)
if (!pars->clickpad)
return;
option_string = xf86SetStrOption(pInfo->options, "SoftButtonAreas", NULL);
option_string = xf86SetStrOption(pInfo->options, option_name, NULL);
if (!option_string)
return;
@ -515,8 +528,8 @@ set_softbutton_areas_option(InputInfoPtr pInfo)
if (!SynapticsIsSoftButtonAreasValid(values))
goto fail;
memcpy(pars->softbutton_areas[0], values, 4 * sizeof(int));
memcpy(pars->softbutton_areas[1], values + 4, 4 * sizeof(int));
memcpy(pars->softbutton_areas[offset], values, 4 * sizeof(int));
memcpy(pars->softbutton_areas[offset + 1], values + 4, 4 * sizeof(int));
free(option_string);
@ -524,11 +537,23 @@ set_softbutton_areas_option(InputInfoPtr pInfo)
fail:
xf86IDrvMsg(pInfo, X_ERROR,
"invalid SoftButtonAreas value '%s', keeping defaults\n",
option_string);
"invalid %s value '%s', keeping defaults\n",
option_name, option_string);
free(option_string);
}
static void
set_primary_softbutton_areas_option(InputInfoPtr pInfo)
{
set_softbutton_areas_option(pInfo, "SoftButtonAreas", BOTTOM_BUTTON_AREA);
}
static void
set_secondary_softbutton_areas_option(InputInfoPtr pInfo)
{
set_softbutton_areas_option(pInfo, "SecondarySoftButtonAreas", TOP_BUTTON_AREA);
}
static void
set_default_parameters(InputInfoPtr pInfo)
{
@ -554,6 +579,8 @@ set_default_parameters(InputInfoPtr pInfo)
int width, height, diag, range;
int horizHyst, vertHyst;
int middle_button_timeout;
int grab_event_device = 0;
const char *source;
/* The synaptics specs specify typical edge widths of 4% on x, and 5.4% on
* y (page 7) [Synaptics TouchPad Interfacing Guide, 510-000080 - A
@ -650,6 +677,11 @@ set_default_parameters(InputInfoPtr pInfo)
pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 180);
pars->click_time = xf86SetIntOption(opts, "ClickTime", 100);
pars->clickpad = xf86SetBoolOption(opts, "ClickPad", pars->clickpad); /* Probed */
if (pars->clickpad)
pars->has_secondary_buttons = xf86SetBoolOption(opts,
"HasSecondarySoftButtons",
pars->has_secondary_buttons);
pars->clickpad_ignore_motion_time = 100; /* ms */
/* middle mouse button emulation on a clickpad? nah, you're joking */
middle_button_timeout = pars->clickpad ? 0 : 75;
pars->emulate_mid_button_time =
@ -724,7 +756,16 @@ set_default_parameters(InputInfoPtr pInfo)
xf86SetRealOption(opts, "PressureMotionMinFactor", 1.0);
pars->press_motion_max_factor =
xf86SetRealOption(opts, "PressureMotionMaxFactor", 1.0);
pars->grab_event_device = xf86SetBoolOption(opts, "GrabEventDevice", TRUE);
/* Only grab the device by default if it's not coming from a config
backend. This way we avoid the device being added twice and sending
duplicate events.
*/
source = xf86CheckStrOption(opts, "_source", NULL);
if (source == NULL || strncmp(source, "server/", 7) != 0)
grab_event_device = TRUE;
pars->grab_event_device = xf86SetBoolOption(opts, "GrabEventDevice", grab_event_device);
pars->tap_and_drag_gesture =
xf86SetBoolOption(opts, "TapAndDragGesture", TRUE);
pars->resolution_horiz =
@ -742,7 +783,9 @@ set_default_parameters(InputInfoPtr pInfo)
"TopEdge is bigger than BottomEdge. Fixing.\n");
}
set_softbutton_areas_option(pInfo);
set_primary_softbutton_areas_option(pInfo);
if (pars->has_secondary_buttons)
set_secondary_softbutton_areas_option(pInfo);
}
static double
@ -866,22 +909,16 @@ SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
xf86ProcessCommonOptions(pInfo, pInfo->options);
if (pInfo->fd != -1) {
if (priv->comm.buffer) {
XisbFree(priv->comm.buffer);
priv->comm.buffer = NULL;
}
xf86CloseSerial(pInfo->fd);
if (priv->comm.buffer) {
XisbFree(priv->comm.buffer);
priv->comm.buffer = NULL;
}
pInfo->fd = -1;
SynapticsCloseFd(pInfo);
return Success;
SetupProc_fail:
if (pInfo->fd >= 0) {
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
}
SynapticsCloseFd(pInfo);
if (priv->comm.buffer)
XisbFree(priv->comm.buffer);
@ -962,33 +999,31 @@ DeviceOn(DeviceIntPtr dev)
}
if (priv->proto_ops->DeviceOnHook &&
!priv->proto_ops->DeviceOnHook(pInfo, &priv->synpara)) {
xf86CloseSerial(pInfo->fd);
return !Success;
}
!priv->proto_ops->DeviceOnHook(pInfo, &priv->synpara))
goto error;
priv->comm.buffer = XisbNew(pInfo->fd, INPUT_BUFFER_SIZE);
if (!priv->comm.buffer) {
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
return !Success;
}
if (!priv->comm.buffer)
goto error;
xf86FlushInput(pInfo->fd);
/* reinit the pad */
if (!QueryHardware(pInfo)) {
XisbFree(priv->comm.buffer);
priv->comm.buffer = NULL;
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
return !Success;
}
if (!QueryHardware(pInfo))
goto error;
xf86AddEnabledDevice(pInfo);
dev->public.on = TRUE;
return Success;
error:
if (priv->comm.buffer) {
XisbFree(priv->comm.buffer);
priv->comm.buffer = NULL;
}
SynapticsCloseFd(pInfo);
return !Success;
}
static void
@ -996,7 +1031,6 @@ SynapticsReset(SynapticsPrivate * priv)
{
SynapticsResetHwState(priv->hwState);
SynapticsResetHwState(priv->local_hw_state);
SynapticsResetHwState(priv->old_hw_state);
SynapticsResetHwState(priv->comm.hwState);
memset(priv->move_hist, 0, sizeof(priv->move_hist));
@ -1006,6 +1040,8 @@ SynapticsReset(SynapticsPrivate * priv)
priv->count_packet_finger = 0;
priv->finger_state = FS_UNTOUCHED;
priv->last_motion_millis = 0;
priv->clickpad_click_millis = 0;
priv->last_button_area = NO_BUTTON_AREA;
priv->tap_state = TS_START;
priv->tap_button = 0;
priv->tap_button_state = TBS_BUTTON_UP;
@ -1046,8 +1082,7 @@ DeviceOff(DeviceIntPtr dev)
XisbFree(priv->comm.buffer);
priv->comm.buffer = NULL;
}
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
SynapticsCloseFd(pInfo);
}
dev->public.on = FALSE;
return rc;
@ -1066,7 +1101,6 @@ DeviceClose(DeviceIntPtr dev)
free(priv->touch_axes);
priv->touch_axes = NULL;
SynapticsHwStateFree(&priv->hwState);
SynapticsHwStateFree(&priv->old_hw_state);
SynapticsHwStateFree(&priv->local_hw_state);
SynapticsHwStateFree(&priv->comm.hwState);
return RetValue;
@ -1312,10 +1346,6 @@ DeviceInit(DeviceIntPtr dev)
if (!priv->hwState)
goto fail;
priv->old_hw_state = SynapticsHwStateAlloc(priv);
if (!priv->old_hw_state)
goto fail;
priv->local_hw_state = SynapticsHwStateAlloc(priv);
if (!priv->local_hw_state)
goto fail;
@ -1439,6 +1469,11 @@ is_inside_active_area(SynapticsPrivate * priv, int x, int y)
{
Bool inside_area = TRUE;
/* If a finger is down, then it must have started inside the active_area,
allow the motion to complete using the entire area */
if (priv->finger_state >= FS_TOUCHED)
return TRUE;
if ((priv->synpara.area_left_edge != 0) &&
(x < priv->synpara.area_left_edge))
inside_area = FALSE;
@ -1460,13 +1495,6 @@ is_inside_button_area(SynapticsParameters * para, int which, int x, int y)
{
Bool inside_area = TRUE;
enum {
LEFT = 0,
RIGHT = 1,
TOP = 2,
BOTTOM = 3
};
if (para->softbutton_areas[which][LEFT] == 0 &&
para->softbutton_areas[which][RIGHT] == 0 &&
para->softbutton_areas[which][TOP] == 0 &&
@ -1492,13 +1520,78 @@ is_inside_button_area(SynapticsParameters * para, int which, int x, int y)
static Bool
is_inside_rightbutton_area(SynapticsParameters * para, int x, int y)
{
return is_inside_button_area(para, 0, x, y);
return is_inside_button_area(para, BOTTOM_RIGHT_BUTTON_AREA, x, y);
}
static Bool
is_inside_middlebutton_area(SynapticsParameters * para, int x, int y)
{
return is_inside_button_area(para, 1, x, y);
return is_inside_button_area(para, BOTTOM_MIDDLE_BUTTON_AREA, x, y);
}
static Bool
is_inside_sec_rightbutton_area(SynapticsParameters * para, int x, int y)
{
return is_inside_button_area(para, TOP_RIGHT_BUTTON_AREA, x, y);
}
static Bool
is_inside_sec_middlebutton_area(SynapticsParameters * para, int x, int y)
{
return is_inside_button_area(para, TOP_MIDDLE_BUTTON_AREA, x, y);
}
static Bool
is_inside_top_or_bottom_button_area(SynapticsParameters * para, int offset,
int x, int y)
{
Bool inside_area = TRUE;
Bool right_valid, middle_valid;
int top, bottom;
/* We don't have a left button area, so we only check the y axis */
right_valid = para->softbutton_areas[offset][TOP] ||
para->softbutton_areas[offset][BOTTOM];
middle_valid = para->softbutton_areas[offset + 1][TOP] ||
para->softbutton_areas[offset + 1][BOTTOM];
if (!right_valid && !middle_valid)
return FALSE;
/* Check both buttons are horizontally aligned */
if (right_valid && middle_valid && (
para->softbutton_areas[offset][TOP] !=
para->softbutton_areas[offset + 1][TOP] ||
para->softbutton_areas[offset][BOTTOM] !=
para->softbutton_areas[offset + 1][BOTTOM]))
return FALSE;
if (right_valid) {
top = para->softbutton_areas[offset][TOP];
bottom = para->softbutton_areas[offset][BOTTOM];
}
else {
top = para->softbutton_areas[offset + 1][TOP];
bottom = para->softbutton_areas[offset + 1][BOTTOM];
}
if (top && y < top)
inside_area = FALSE;
else if (bottom && y > bottom)
inside_area = FALSE;
return inside_area;
}
static enum SoftButtonAreas
current_button_area(SynapticsParameters * para, int x, int y)
{
if (is_inside_top_or_bottom_button_area(para, BOTTOM_BUTTON_AREA, x, y))
return BOTTOM_BUTTON_AREA;
else if (is_inside_top_or_bottom_button_area(para, TOP_BUTTON_AREA, x, y))
return TOP_BUTTON_AREA;
else
return NO_BUTTON_AREA;
}
static CARD32
@ -1860,7 +1953,8 @@ HandleTapProcessing(SynapticsPrivate * priv, struct SynapticsHwState *hw,
enum EdgeType edge;
int delay = 1000000000;
if (priv->finger_state == FS_BLOCKED)
if (para->touchpad_off == TOUCHPAD_OFF ||
priv->finger_state == FS_BLOCKED)
return delay;
touch = finger >= FS_TOUCHED && priv->finger_state == FS_UNTOUCHED;
@ -2097,11 +2191,8 @@ static void
get_delta(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
enum EdgeType edge, double *dx, double *dy)
{
double dtime = (hw->millis - HIST(0).millis) / 1000.0;
double integral;
double tmpf;
int x_edge_speed = 0;
int y_edge_speed = 0;
*dx = hw->x - HIST(0).x;
*dy = hw->y - HIST(0).y;
@ -2116,10 +2207,10 @@ get_delta(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
if (isnan(priv->frac_y))
priv->frac_y = 0;
tmpf = *dx + x_edge_speed * dtime + priv->frac_x;
tmpf = *dx + priv->frac_x;
priv->frac_x = modf(tmpf, &integral);
*dx = integral;
tmpf = *dy + y_edge_speed * dtime + priv->frac_y;
tmpf = *dy + priv->frac_y;
priv->frac_y = modf(tmpf, &integral);
*dy = integral;
}
@ -2278,7 +2369,9 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw,
SynapticsParameters *para = &priv->synpara;
int delay = 1000000000;
if ((priv->synpara.touchpad_off == TOUCHPAD_TAP_OFF) || (priv->finger_state == FS_BLOCKED)) {
if (priv->synpara.touchpad_off == TOUCHPAD_TAP_OFF ||
priv->synpara.touchpad_off == TOUCHPAD_OFF ||
priv->finger_state == FS_BLOCKED) {
stop_coasting(priv);
priv->circ_scroll_on = FALSE;
priv->vert_scroll_edge_on = FALSE;
@ -2587,6 +2680,13 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv,
close_point >>= 1;
}
/* Some trackpads touchpad only track two touchpoints but announce
* BTN_TOOL_TRIPLETAP (which sets hw->numFingers to 3), when this happens
* the user likely intents to do a 3 finger click, so handle it as such.
*/
if (hw->numFingers >= 3 && hw->num_mt_mask < 3)
nfingers = 3;
return nfingers;
}
@ -2674,7 +2774,7 @@ adjust_state_from_scrollbuttons(const InputInfoPtr pInfo,
static void
update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw,
struct SynapticsHwState *old, CARD32 now, int *delay)
CARD32 now, int *delay)
{
SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo->private);
SynapticsParameters *para = &priv->synpara;
@ -2690,32 +2790,45 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw,
* the soft button instead. */
if (para->clickpad) {
/* hw->left is down, but no other buttons were already down */
if (!old->left && !old->right && !old->middle &&
hw->left && !hw->right && !hw->middle) {
if (is_inside_rightbutton_area(para, hw->x, hw->y)) {
hw->left = 0;
hw->right = 1;
}
else if (is_inside_middlebutton_area(para, hw->x, hw->y)) {
hw->left = 0;
hw->middle = 1;
}
if (!(priv->lastButtons & 7) && hw->left && !hw->right && !hw->middle) {
/* If the finger down event is delayed, the x and y
* coordinates are stale so we delay processing the click */
if (hw->z < para->finger_low) {
hw->left = 0;
goto out;
}
if (is_inside_rightbutton_area(para, hw->x, hw->y)) {
hw->left = 0;
hw->right = 1;
}
else if (is_inside_sec_rightbutton_area(para, hw->x, hw->y)) {
hw->left = 0;
hw->right = 1;
}
else if (is_inside_middlebutton_area(para, hw->x, hw->y)) {
hw->left = 0;
hw->middle = 1;
}
else if (is_inside_sec_middlebutton_area(para, hw->x, hw->y)) {
hw->left = 0;
hw->middle = 1;
}
priv->clickpad_click_millis = now;
}
else if (hw->left) {
hw->left = old->left;
hw->right = old->right;
hw->middle = old->middle;
hw->left = (priv->lastButtons & 1) ? 1 : 0;
hw->middle = (priv->lastButtons & 2) ? 1 : 0;
hw->right = (priv->lastButtons & 4) ? 1 : 0;
}
}
/* Fingers emulate other buttons. ClickFinger can only be
triggered on transition, when left is pressed
*/
if (hw->left && !old->left && !old->middle && !old->right &&
hw->numFingers >= 1) {
if (hw->left && !(priv->lastButtons & 7) && hw->numFingers >= 1)
handle_clickfinger(priv, hw);
}
out:
/* Two finger emulation */
if (hw->numFingers == 1 && hw->z >= para->emulate_twofinger_z &&
hw->fingerWidth >= para->emulate_twofinger_w) {
@ -2971,12 +3084,8 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
int delay = 1000000000;
int timeleft;
Bool inside_active_area;
/* If touchpad is switched off, we skip the whole thing and return delay */
if (para->touchpad_off == TOUCHPAD_OFF) {
UpdateTouchState(pInfo, hw);
return delay;
}
Bool using_cumulative_coords = FALSE;
Bool ignore_motion;
/* We need both and x/y, the driver can't handle just one of the two
* yet. But since it's possible to hit a phys button on non-clickpads
@ -2993,9 +3102,11 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
/* If a physical button is pressed on a clickpad, use cumulative relative
* touch movements for motion */
if (para->clickpad && (hw->left || hw->right || hw->middle)) {
if (para->clickpad && (priv->lastButtons & 7) &&
priv->last_button_area != TOP_BUTTON_AREA) {
hw->x = hw->cumulative_dx;
hw->y = hw->cumulative_dy;
using_cumulative_coords = TRUE;
}
/* apply hysteresis before doing anything serious. This cancels
@ -3005,22 +3116,39 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
inside_active_area = is_inside_active_area(priv, hw->x, hw->y);
/* Ignore motion *starting* inside softbuttonareas */
if (priv->finger_state < FS_TOUCHED)
priv->last_button_area = current_button_area(para, hw->x, hw->y);
/* If we already have a finger down, clear last_button_area if it goes
outside of the softbuttonareas */
else if (priv->last_button_area != NO_BUTTON_AREA &&
current_button_area(para, hw->x, hw->y) == NO_BUTTON_AREA)
priv->last_button_area = NO_BUTTON_AREA;
ignore_motion = para->touchpad_off == TOUCHPAD_OFF ||
(!using_cumulative_coords && priv->last_button_area != NO_BUTTON_AREA);
/* these two just update hw->left, right, etc. */
update_hw_button_state(pInfo, hw, priv->old_hw_state, now, &delay);
update_hw_button_state(pInfo, hw, now, &delay);
if (priv->has_scrollbuttons)
double_click = adjust_state_from_scrollbuttons(pInfo, hw);
/* Ignore motion the first X ms after a clickpad click */
if (priv->clickpad_click_millis) {
if(TIME_DIFF(priv->clickpad_click_millis +
para->clickpad_ignore_motion_time, now) > 0)
ignore_motion = TRUE;
else
priv->clickpad_click_millis = 0;
}
/* now we know that these _coordinates_ aren't in the area.
invalid are: x, y, z, numFingers, fingerWidth
valid are: millis, left/right/middle/up/down/etc.
*/
if (!inside_active_area) {
if (!inside_active_area)
reset_hw_state(hw);
/* FIXME: if finger accidentally moves into the area and doesn't
* really release, the finger should remain down. */
}
/* no edge or finger detection outside of area */
if (inside_active_area) {
edge = edge_detection(priv, hw->x, hw->y);
@ -3080,7 +3208,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
}
/* Post events */
if (finger >= FS_TOUCHED && (dx || dy))
if (finger >= FS_TOUCHED && (dx || dy) && !ignore_motion)
xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy);
if (priv->mid_emu_state == MBE_LEFT_CLICK) {
@ -3127,9 +3255,6 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
if (inside_active_area)
store_history(priv, hw->x, hw->y, hw->millis);
/* Save logical state for transition comparisons */
SynapticsCopyHwState(priv->old_hw_state, hw);
return delay;
}

View File

@ -149,6 +149,23 @@ enum TouchpadModel {
MODEL_UNIBODY_MACBOOK
};
enum SoftButtonAreas {
NO_BUTTON_AREA = -1,
BOTTOM_BUTTON_AREA = 0,
BOTTOM_RIGHT_BUTTON_AREA = 0,
BOTTOM_MIDDLE_BUTTON_AREA = 1,
TOP_BUTTON_AREA = 2,
TOP_RIGHT_BUTTON_AREA = 2,
TOP_MIDDLE_BUTTON_AREA = 3
};
enum SoftButtonAreaEdges {
LEFT = 0,
RIGHT = 1,
TOP = 2,
BOTTOM = 3
};
typedef struct _SynapticsParameters {
/* Parameter data */
int left_edge, right_edge, top_edge, bottom_edge; /* edge coordinates absolute */
@ -159,6 +176,8 @@ typedef struct _SynapticsParameters {
int tap_time_2; /* max. tapping time for double taps */
int click_time; /* The duration of a single click */
Bool clickpad; /* Device is a has integrated buttons */
Bool has_secondary_buttons; /* Device has a top soft-button area */
int clickpad_ignore_motion_time; /* Ignore motion for X ms after a click */
int emulate_mid_button_time; /* Max time between left and right button presses to
emulate a middle button press. */
int emulate_twofinger_z; /* pressure threshold to emulate two finger touch (for Alps) */
@ -205,7 +224,7 @@ typedef struct _SynapticsParameters {
unsigned int resolution_horiz; /* horizontal resolution of touchpad in units/mm */
unsigned int resolution_vert; /* vertical resolution of touchpad in units/mm */
int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */
int softbutton_areas[2][4]; /* soft button area coordinates, 0 => right, 1 => middle button */
int softbutton_areas[4][4]; /* soft button area coordinates, 0 => right, 1 => middle , 2 => secondary right, 3 => secondary middle button */
int hyst_x, hyst_y; /* x and y width of hysteresis box */
} SynapticsParameters;
@ -216,7 +235,6 @@ struct _SynapticsPrivateRec {
void *proto_data; /* protocol-specific data */
struct SynapticsHwState *hwState;
struct SynapticsHwState *old_hw_state; /* previous logical hw state */
const char *device; /* device node */
CARD32 timer_time; /* when timer last fired */
@ -248,6 +266,8 @@ struct _SynapticsPrivateRec {
Bool prev_up; /* Previous up button value, for double click emulation */
enum FingerState finger_state; /* previous finger state */
CARD32 last_motion_millis; /* time of the last motion */
enum SoftButtonAreas last_button_area; /* Last button area we were in */
int clickpad_click_millis; /* Time of last clickpad click */
enum TapState tap_state; /* State of tap processing */
int tap_max_fingers; /* Max number of fingers seen since entering start state */

View File

@ -36,15 +36,19 @@
#include <xf86Xinput.h>
#include <xisb.h>
#ifndef XI86_SERVER_FD
#define XI86_SERVER_FD 0x20
#endif
struct _SynapticsPrivateRec;
typedef struct _SynapticsPrivateRec SynapticsPrivate;
enum SynapticsSlotState {
SLOTSTATE_EMPTY = 0,
SLOTSTATE_OPEN,
SLOTSTATE_CLOSE,
SLOTSTATE_OPEN_EMPTY,
SLOTSTATE_UPDATE,
SLOTSTATE_EMPTY = 0, /* no slot in this cycle */
SLOTSTATE_OPEN, /* tracking ID received */
SLOTSTATE_CLOSE, /* tracking ID -1 received */
SLOTSTATE_OPEN_EMPTY, /* previously had tracking id, no events in this read cycle */
SLOTSTATE_UPDATE, /* had tracking id, other events in this cycle */
};
/* used to mark emulated hw button state */

View File

@ -1,127 +0,0 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
scriptversion=2012-06-27.10; # UTC
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
set -u
usage_error ()
{
echo "$0: $*" >&2
print_usage >&2
exit 2
}
print_usage ()
{
cat <<END
Usage:
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
[--expect-failure={yes|no}] [--color-tests={yes|no}]
[--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
END
}
# TODO: better error handling in option parsing (in particular, ensure
# TODO: $log_file, $trs_file and $test_name are defined).
test_name= # Used for reporting.
log_file= # Where to save the output of the test script.
trs_file= # Where to save the metadata of the test run.
expect_failure=no
color_tests=no
enable_hard_errors=yes
while test $# -gt 0; do
case $1 in
--help) print_usage; exit $?;;
--version) echo "test-driver $scriptversion"; exit $?;;
--test-name) test_name=$2; shift;;
--log-file) log_file=$2; shift;;
--trs-file) trs_file=$2; shift;;
--color-tests) color_tests=$2; shift;;
--expect-failure) expect_failure=$2; shift;;
--enable-hard-errors) enable_hard_errors=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
esac
shift
done
if test $color_tests = yes; then
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
red='' # Red.
grn='' # Green.
lgn='' # Light green.
blu='' # Blue.
mgn='' # Magenta.
std='' # No color.
else
red= grn= lgn= blu= mgn= std=
fi
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
trap "st=129; $do_exit" 1
trap "st=130; $do_exit" 2
trap "st=141; $do_exit" 13
trap "st=143; $do_exit" 15
# Test script is run here.
"$@" >$log_file 2>&1
estatus=$?
if test $enable_hard_errors = no && test $estatus -eq 99; then
estatus=1
fi
case $estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;;
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac
# Report outcome to console.
echo "${col}${res}${std}: $test_name"
# Register the test result, and other relevant metadata.
echo ":test-result: $res" > $trs_file
echo ":global-test-result: $res" >> $trs_file
echo ":recheck: $recheck" >> $trs_file
echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,18 +0,0 @@
if ENABLE_UNIT_TESTS
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include
AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
fake_syms = fake-symbols.c fake-symbols.h
if BUILD_EVENTCOMM
noinst_PROGRAMS = eventcomm-test
eventcomm_test_SOURCES = eventcomm-test.c\
$(top_srcdir)/src/eventcomm.c \
$(top_srcdir)/src/synproto.c \
$(fake_syms)
eventcomm_test_LDADD = $(MTDEV_LIBS)
endif
TESTS = $(noinst_PROGRAMS)
endif

View File

@ -1,715 +0,0 @@
# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@noinst_PROGRAMS = eventcomm-test$(EXEEXT)
subdir = test
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am__eventcomm_test_SOURCES_DIST = eventcomm-test.c \
$(top_srcdir)/src/eventcomm.c $(top_srcdir)/src/synproto.c \
fake-symbols.c fake-symbols.h
@ENABLE_UNIT_TESTS_TRUE@am__objects_1 = fake-symbols.$(OBJEXT)
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@am_eventcomm_test_OBJECTS = eventcomm-test.$(OBJEXT) \
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@ eventcomm.$(OBJEXT) \
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@ synproto.$(OBJEXT) \
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@ $(am__objects_1)
eventcomm_test_OBJECTS = $(am_eventcomm_test_OBJECTS)
am__DEPENDENCIES_1 =
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@eventcomm_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(eventcomm_test_SOURCES)
DIST_SOURCES = $(am__eventcomm_test_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
ETAGS = etags
CTAGS = ctags
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
am__tty_colors = $(am__tty_colors_dummy)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
MTDEV_CFLAGS = @MTDEV_CFLAGS@
MTDEV_LIBS = @MTDEV_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XI_CFLAGS = @XI_CFLAGS@
XI_LIBS = @XI_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
XTST_CFLAGS = @XTST_CFLAGS@
XTST_LIBS = @XTST_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
configdir = @configdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
inputdir = @inputdir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sdkdir = @sdkdir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@ENABLE_UNIT_TESTS_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include
@ENABLE_UNIT_TESTS_TRUE@AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
@ENABLE_UNIT_TESTS_TRUE@fake_syms = fake-symbols.c fake-symbols.h
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@eventcomm_test_SOURCES = eventcomm-test.c\
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@ $(top_srcdir)/src/eventcomm.c \
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@ $(top_srcdir)/src/synproto.c \
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@ $(fake_syms)
@BUILD_EVENTCOMM_TRUE@@ENABLE_UNIT_TESTS_TRUE@eventcomm_test_LDADD = $(MTDEV_LIBS)
@ENABLE_UNIT_TESTS_TRUE@TESTS = $(noinst_PROGRAMS)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign test/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
eventcomm-test$(EXEEXT): $(eventcomm_test_OBJECTS) $(eventcomm_test_DEPENDENCIES) $(EXTRA_eventcomm_test_DEPENDENCIES)
@rm -f eventcomm-test$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(eventcomm_test_OBJECTS) $(eventcomm_test_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventcomm-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventcomm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake-symbols.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synproto.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
eventcomm.o: $(top_srcdir)/src/eventcomm.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eventcomm.o -MD -MP -MF $(DEPDIR)/eventcomm.Tpo -c -o eventcomm.o `test -f '$(top_srcdir)/src/eventcomm.c' || echo '$(srcdir)/'`$(top_srcdir)/src/eventcomm.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eventcomm.Tpo $(DEPDIR)/eventcomm.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/eventcomm.c' object='eventcomm.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eventcomm.o `test -f '$(top_srcdir)/src/eventcomm.c' || echo '$(srcdir)/'`$(top_srcdir)/src/eventcomm.c
eventcomm.obj: $(top_srcdir)/src/eventcomm.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT eventcomm.obj -MD -MP -MF $(DEPDIR)/eventcomm.Tpo -c -o eventcomm.obj `if test -f '$(top_srcdir)/src/eventcomm.c'; then $(CYGPATH_W) '$(top_srcdir)/src/eventcomm.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/eventcomm.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eventcomm.Tpo $(DEPDIR)/eventcomm.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/eventcomm.c' object='eventcomm.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eventcomm.obj `if test -f '$(top_srcdir)/src/eventcomm.c'; then $(CYGPATH_W) '$(top_srcdir)/src/eventcomm.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/eventcomm.c'; fi`
synproto.o: $(top_srcdir)/src/synproto.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT synproto.o -MD -MP -MF $(DEPDIR)/synproto.Tpo -c -o synproto.o `test -f '$(top_srcdir)/src/synproto.c' || echo '$(srcdir)/'`$(top_srcdir)/src/synproto.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/synproto.Tpo $(DEPDIR)/synproto.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/synproto.c' object='synproto.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o synproto.o `test -f '$(top_srcdir)/src/synproto.c' || echo '$(srcdir)/'`$(top_srcdir)/src/synproto.c
synproto.obj: $(top_srcdir)/src/synproto.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT synproto.obj -MD -MP -MF $(DEPDIR)/synproto.Tpo -c -o synproto.obj `if test -f '$(top_srcdir)/src/synproto.c'; then $(CYGPATH_W) '$(top_srcdir)/src/synproto.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/synproto.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/synproto.Tpo $(DEPDIR)/synproto.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/synproto.c' object='synproto.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o synproto.obj `if test -f '$(top_srcdir)/src/synproto.c'; then $(CYGPATH_W) '$(top_srcdir)/src/synproto.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/synproto.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
list=' $(TESTS) '; \
$(am__tty_colors); \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
col=$$red; res=XPASS; \
;; \
*) \
col=$$grn; res=PASS; \
;; \
esac; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
xfail=`expr $$xfail + 1`; \
col=$$lgn; res=XFAIL; \
;; \
*) \
failed=`expr $$failed + 1`; \
col=$$red; res=FAIL; \
;; \
esac; \
else \
skip=`expr $$skip + 1`; \
col=$$blu; res=SKIP; \
fi; \
echo "$${col}$$res$${std}: $$tst"; \
done; \
if test "$$all" -eq 1; then \
tests="test"; \
All=""; \
else \
tests="tests"; \
All="All "; \
fi; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="$$All$$all $$tests passed"; \
else \
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all $$tests failed"; \
else \
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
fi; \
fi; \
dashes="$$banner"; \
skipped=""; \
if test "$$skip" -ne 0; then \
if test "$$skip" -eq 1; then \
skipped="($$skip test was not run)"; \
else \
skipped="($$skip tests were not run)"; \
fi; \
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$skipped"; \
fi; \
report=""; \
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
report="Please report to $(PACKAGE_BUGREPORT)"; \
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$report"; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
col="$$grn"; \
else \
col="$$red"; \
fi; \
echo "$${col}$$dashes$${std}"; \
echo "$${col}$$banner$${std}"; \
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
test -z "$$report" || echo "$${col}$$report$${std}"; \
echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: check-am install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
clean-generic clean-libtool clean-noinstPROGRAMS cscopelist \
ctags distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,326 +0,0 @@
/*
* Copyright © 2011 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation, and that the name of Red Hat
* not be used in advertising or publicity pertaining to distribution
* of the software without specific, written prior permission. Red
* Hat makes no representations about the suitability of this software
* for any purpose. It is provided "as is" without express or implied
* warranty.
*
* THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Authors:
* Peter Hutterer
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <assert.h>
#include "synapticsstr.h"
#include "eventcomm.h"
#define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
int fd_read, fd_write;
/* A syn event, always handy to have */
struct input_event syn = { {0, 0}, EV_SYN, SYN_REPORT, 0 };
static void
create_pipe_fd(void)
{
int pipefd[2];
assert(pipe(pipefd) != -1);
fd_read = pipefd[0];
fd_write = pipefd[1];
}
static void
reset_data(struct SynapticsHwState **hw, struct CommData *comm,
SynapticsPrivate * priv)
{
SynapticsHwStateFree(&comm->hwState);
memset(comm, 0, sizeof(struct CommData));
SynapticsHwStateFree(hw);
*hw = SynapticsHwStateAlloc(priv);
comm->hwState = SynapticsHwStateAlloc(priv);
}
/**
* Write n input events to fd, followed by the syn event.
*/
static void
write_event(int fd, struct input_event *ev, int n)
{
write(fd, ev, sizeof(struct input_event) * n);
write(fd, &syn, sizeof(syn));
}
static void
test_buttons(int fd, InputInfoPtr pInfo, struct CommData *comm)
{
SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private;
struct SynapticsHwState *hw = NULL;
struct input_event ev = { {0, 0}, EV_KEY, 0, 0 };
reset_data(&hw, comm, priv);
#define _test_press_release(_code, field) \
ev.code = (_code); \
ev.value = 1; \
write_event(fd, &ev, 1); \
EventReadHwState(pInfo, comm, hw); \
assert(hw->field == 1); \
ev.value = 0; /* button release */ \
write_event(fd_write, &ev, 1); \
EventReadHwState(pInfo, comm, hw); \
assert(hw->field == 0);
_test_press_release(BTN_LEFT, left);
_test_press_release(BTN_RIGHT, right);
_test_press_release(BTN_MIDDLE, middle);
_test_press_release(BTN_FORWARD, up);
_test_press_release(BTN_BACK, down);
_test_press_release(BTN_0, multi[0]);
_test_press_release(BTN_1, multi[1]);
_test_press_release(BTN_2, multi[2]);
_test_press_release(BTN_3, multi[3]);
_test_press_release(BTN_4, multi[4]);
_test_press_release(BTN_5, multi[5]);
_test_press_release(BTN_6, multi[6]);
_test_press_release(BTN_7, multi[7]);
SynapticsHwStateFree(&hw);
}
/**
* This test checks that the recognised event fields set the right hardware
* state. It's a fairly limited test and does not check whether any of the
* others change the HW state at all.
*/
static void
test_read_hw_state(void)
{
InputInfoRec info = { 0 };
SynapticsPrivate private;
struct SynapticsHwState *hw = NULL;
struct CommData comm = { 0 };
struct input_event ev[] = {
{{0, 0}, EV_KEY, BTN_TOOL_FINGER, 1},
{{0, 0}, EV_KEY, BTN_TOOL_DOUBLETAP, 1},
{{0, 0}, EV_KEY, BTN_TOOL_TRIPLETAP, 1},
{{0, 0}, EV_ABS, ABS_X, 42},
{{0, 0}, EV_ABS, ABS_Y, 21},
{{0, 0}, EV_ABS, ABS_PRESSURE, 56},
{{0, 0}, EV_ABS, ABS_TOOL_WIDTH, 204},
};
memset(&private, 0, sizeof(private));
info.private = &private;
info.fd = fd_read;
private.proto_data = EventProtoDataAlloc();
/* just the syn event */
reset_data(&hw, &comm, &private);
write(fd_write, &syn, sizeof(syn));
EventReadHwState(&info, &comm, hw);
assert(hw->numFingers == 0);
/* one finger */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[0], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->numFingers == 1);
/* two fingers */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[1], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->numFingers == 2);
/* three fingers */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[2], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->numFingers == 3);
/* x/y data */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[3], 2);
EventReadHwState(&info, &comm, hw);
assert(hw->x == ev[3].value);
assert(hw->y == ev[4].value);
/* pressure */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[5], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->z == ev[5].value);
/* finger width */
reset_data(&hw, &comm, &private);
write_event(fd_write, &ev[6], 1);
EventReadHwState(&info, &comm, hw);
assert(hw->fingerWidth == ev[6].value);
/* the various buttons */
test_buttons(fd_write, &info, &comm);
free(private.proto_data);
SynapticsHwStateFree(&hw);
SynapticsHwStateFree(&comm.hwState);
}
static Bool
compare_hw_state(const struct SynapticsHwState *a,
const struct SynapticsHwState *b)
{
#define COMPARE(x) \
if (a->x != b->x) return a->x - b->x
COMPARE(millis);
COMPARE(x);
COMPARE(y);
COMPARE(z);
COMPARE(numFingers);
COMPARE(fingerWidth);
COMPARE(left);
COMPARE(right);
COMPARE(up);
COMPARE(down);
if (memcmp(a->multi, b->multi, sizeof(a->multi)))
return memcmp(a->multi, b->multi, sizeof(a->multi));
COMPARE(middle);
#undef COMPARE
return 0;
}
/**
* Make sure that axes/keys unknown to the driver don't change the hardware
* state.
*/
static void
test_ignore_hw_state(void)
{
int i;
InputInfoRec info = { 0 };
SynapticsPrivate private;
struct SynapticsHwState *hw = NULL;
struct SynapticsHwState *hw_zero = NULL;
struct CommData comm = { 0 };
int known_abs[] = {
ABS_X,
ABS_Y,
ABS_PRESSURE,
ABS_TOOL_WIDTH,
};
int known_keys[] = {
BTN_LEFT,
BTN_RIGHT,
BTN_MIDDLE,
BTN_FORWARD,
BTN_BACK,
BTN_0,
BTN_1,
BTN_2,
BTN_3,
BTN_4,
BTN_5,
BTN_6,
BTN_7,
BTN_TOOL_FINGER,
BTN_TOOL_DOUBLETAP,
BTN_TOOL_TRIPLETAP,
BTN_TOUCH
};
struct input_event ev = { {0, 0}, 0, 0, 1 };
memset(&private, 0, sizeof(private));
info.private = &private;
info.fd = fd_read;
private.proto_data = EventProtoDataAlloc();
reset_data(&hw_zero, &comm, &private);
#define _assert_no_change(_type, _code) \
reset_data(&hw, &comm, &private); \
ev.type = _type; \
ev.code = _code; \
ev.value = 1; \
write_event(fd_write, &ev, 1); \
EventReadHwState(&info, &comm, hw); \
assert(compare_hw_state(hw, hw_zero) == 0);
for (i = ABS_X; i < ABS_MAX; i++) {
int j, skip = 0;
for (j = 0; j < ArrayLength(known_abs); j++) {
if (i == known_abs[j]) {
skip = 1;
break;
}
}
if (skip)
continue;
_assert_no_change(EV_ABS, i);
}
for (i = KEY_RESERVED; i < KEY_MAX; i++) {
int j, skip = 0;
for (j = 0; j < ArrayLength(known_keys); j++) {
if (i == known_keys[j]) {
skip = 1;
break;
}
}
if (skip)
continue;
_assert_no_change(EV_KEY, i);
}
free(private.proto_data);
SynapticsHwStateFree(&hw);
SynapticsHwStateFree(&hw_zero);
SynapticsHwStateFree(&comm.hwState);
}
int
main(int argc, char **argv)
{
create_pipe_fd();
test_read_hw_state();
test_ignore_hw_state();
return 0;
}

View File

@ -1,452 +0,0 @@
#include "fake-symbols.h"
_X_EXPORT int
xf86ReadSerial(int fd, void *buf, int count)
{
return 0;
}
_X_EXPORT int
xf86WriteSerial(int fd, const void *buf, int count)
{
return 0;
}
_X_EXPORT int
xf86CloseSerial(int fd)
{
return 0;
}
_X_EXPORT int
xf86WaitForInput(int fd, int timeout)
{
return 0;
}
_X_EXPORT int
xf86OpenSerial(XF86OptionPtr options)
{
return 0;
}
_X_EXPORT int
xf86SetSerialSpeed(int fd, int speed)
{
return 0;
}
_X_EXPORT XF86OptionPtr
xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name, const int val)
{
return NULL;
}
_X_EXPORT char *
xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt)
{
return NULL;
}
_X_EXPORT int
xf86SetBoolOption(XF86OptionPtr optlist, const char *name, int deflt)
{
return 0;
}
_X_EXPORT XF86OptionPtr
xf86AddNewOption(XF86OptionPtr head, const char *name, const char *val)
{
return NULL;
}
_X_EXPORT const char *
xf86FindOptionValue(XF86OptionPtr options, const char *name)
{
return NULL;
}
_X_EXPORT char *
xf86OptionName(XF86OptionPtr opt)
{
return NULL;
}
_X_EXPORT char *
xf86OptionValue(XF86OptionPtr opt)
{
return NULL;
}
_X_EXPORT int
xf86NameCmp(const char *s1, const char *s2)
{
return 0;
}
_X_EXPORT void
xf86AddEnabledDevice(InputInfoPtr pInfo)
{
return;
}
_X_EXPORT void
xf86RemoveEnabledDevice(InputInfoPtr pInfo)
{
return;
}
_X_EXPORT Atom
XIGetKnownProperty(char *name)
{
return None;
}
_X_EXPORT void
xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags)
{
return;
}
_X_EXPORT int
xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min)
{
int X;
int64_t to_width = to_max - to_min;
int64_t from_width = from_max - from_min;
if (from_width) {
X = (int) (((to_width * (Cx - from_min)) / from_width) + to_min);
}
else {
X = 0;
/*ErrorF ("Divide by Zero in xf86ScaleAxis\n"); */
}
if (X > to_max)
X = to_max;
if (X < to_min)
X = to_min;
return X;
}
_X_EXPORT void
DeleteInputDeviceRequest(DeviceIntPtr pDev)
{
return;
}
_X_EXPORT void
FreeInputAttributes(InputAttributes * attrs)
{
return;
}
_X_EXPORT void
xf86PostButtonEvent(DeviceIntPtr device,
int is_absolute,
int button,
int is_down, int first_valuator, int num_valuators, ...)
{
return;
}
_X_EXPORT int
Xasprintf(char **ret, const char *format, ...)
{
return 0;
}
_X_EXPORT int
XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable)
{
return 0;
}
_X_EXPORT InputInfoPtr
xf86FirstLocalDevice(void)
{
return NULL;
}
_X_EXPORT void
xf86DeleteInput(InputInfoPtr pInp, int flags)
{
return;
}
_X_EXPORT XF86OptionPtr
xf86OptionListDuplicate(XF86OptionPtr options)
{
return NULL;
}
_X_EXPORT Bool
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels,
CARD8 *map)
{
return FALSE;
}
_X_EXPORT void
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval,
int maxval, int resolution, int min_res, int max_res,
int mode)
{
return;
}
_X_EXPORT void
xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down)
{
return;
}
_X_EXPORT int
xf86SetIntOption(XF86OptionPtr optlist, const char *name, int deflt)
{
return 0;
}
_X_EXPORT void
xf86PostButtonEventP(DeviceIntPtr device,
int is_absolute,
int button,
int is_down, int first_valuator, int num_valuators,
const int *valuators)
{
return;
}
_X_EXPORT Bool
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
{
return FALSE;
}
_X_EXPORT int
XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
int format, int mode, unsigned long len,
XF86OptionPtr value, Bool sendevent)
{
return 0;
}
_X_EXPORT CARD32
GetTimeInMillis(void)
{
return 0;
}
_X_EXPORT int
NewInputDeviceRequest(InputOption *options,
InputAttributes * attrs,
DeviceIntPtr *pdev)
{
return 0;
}
_X_EXPORT Bool
InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc)
{
return FALSE;
}
_X_EXPORT InputAttributes *
DuplicateInputAttributes(InputAttributes * attrs)
{
return NULL;
}
_X_EXPORT int
ValidAtom(Atom atom)
{
return None;
}
_X_EXPORT Bool
InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
{
return FALSE;
}
_X_EXPORT long
XIRegisterPropertyHandler(DeviceIntPtr dev,
int (*SetProperty) (DeviceIntPtr dev,
Atom property,
XIPropertyValuePtr prop,
BOOL checkonly),
int (*GetProperty) (DeviceIntPtr dev,
Atom property),
int (*DeleteProperty) (DeviceIntPtr dev,
Atom property))
{
return 0;
}
_X_EXPORT int
InitProximityClassDeviceStruct(DeviceIntPtr dev)
{
return 0;
}
_X_EXPORT void
xf86Msg(MessageType type, const char *format, ...)
{
return;
}
_X_EXPORT void
xf86MsgVerb(MessageType type, int verb, const char *format, ...)
{
return;
}
_X_EXPORT void
xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...)
{
return;
}
_X_EXPORT void
LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...)
{
return;
}
_X_EXPORT void
xf86PostMotionEventP(DeviceIntPtr device,
int is_absolute, int first_valuator, int num_valuators,
const int *valuators)
{
return;
}
_X_EXPORT Bool
InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
int numMotionEvents, int mode)
{
return FALSE;
}
_X_EXPORT XF86OptionPtr
xf86ReplaceStrOption(XF86OptionPtr optlist, const char *name, const char *val)
{
return NULL;
}
_X_EXPORT XF86OptionPtr
xf86NextOption(XF86OptionPtr list)
{
return NULL;
}
_X_EXPORT int
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value)
{
return 0;
}
_X_EXPORT Atom
MakeAtom(const char *string, unsigned len, Bool makeit)
{
return None;
}
_X_EXPORT int
GetMotionHistorySize(void)
{
return 0;
}
_X_EXPORT void
xf86PostProximityEventP(DeviceIntPtr device,
int is_in, int first_valuator, int num_valuators,
const int *valuators)
{
return;
}
_X_EXPORT Bool
InitFocusClassDeviceStruct(DeviceIntPtr dev)
{
return FALSE;
}
void
xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list)
{
}
void
xf86CollectInputOptions(InputInfoPtr pInfo,
const char **defaultOpts)
{
}
InputInfoPtr
xf86AllocateInput(void)
{
return NULL;
}
ClientPtr serverClient;
Bool
QueueWorkProc(Bool (*function)
(ClientPtr /* pClient */ , pointer /* closure */ ),
ClientPtr client, pointer closure)
{
return FALSE;
}
_X_EXPORT ValuatorMask *
valuator_mask_new(int num_valuators)
{
return NULL;
}
_X_EXPORT void
valuator_mask_free(ValuatorMask **mask)
{
}
_X_EXPORT int
valuator_mask_get(const ValuatorMask *mask, int valuator)
{
return 0;
}
_X_EXPORT void
valuator_mask_set(ValuatorMask *mask, int valuator, int data)
{
}
extern _X_EXPORT void
valuator_mask_unset(ValuatorMask *mask, int bit)
{
}
_X_EXPORT int
valuator_mask_num_valuators(const ValuatorMask *mask)
{
return 0;
}
_X_EXPORT void
valuator_mask_zero(ValuatorMask *mask)
{
}
_X_EXPORT void
valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src)
{
}
_X_EXPORT void
xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid,
uint16_t type, uint32_t flags, const ValuatorMask *mask)
{
}

View File

@ -1,156 +0,0 @@
#include <xorg-server.h>
#include <xf86Xinput.h>
extern int xf86ReadSerial(int fd, void *buf, int count);
extern int xf86WriteSerial(int fd, const void *buf, int count);
extern int xf86CloseSerial(int fd);
extern int xf86WaitForInput(int fd, int timeout);
extern int xf86OpenSerial(XF86OptionPtr options);
extern int xf86SetSerialSpeed(int fd, int speed);
extern XF86OptionPtr xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name,
const int val);
extern XF86OptionPtr xf86AddNewOption(XF86OptionPtr head, const char *name,
const char *val);
extern char *xf86OptionName(XF86OptionPtr opt);
extern const char *xf86FindOptionValue(XF86OptionPtr options, const char *name);
extern int xf86NameCmp(const char *s1, const char *s2);
extern char *xf86SetStrOption(XF86OptionPtr optlist, const char *name,
const char *deflt);
extern int xf86SetBoolOption(XF86OptionPtr optlist, const char *name, int deflt);
extern XF86OptionPtr xf86AddNewOption(XF86OptionPtr head, const char *name,
const char *val);
extern const char *xf86FindOptionValue(XF86OptionPtr options, const char *name);
extern char *xf86OptionName(XF86OptionPtr opt);
extern char *xf86OptionValue(XF86OptionPtr opt);
extern int xf86NameCmp(const char *s1, const char *s2);
extern void xf86AddEnabledDevice(InputInfoPtr pInfo);
extern void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
extern Atom XIGetKnownProperty(char *name);
extern void xf86AddInputDriver(InputDriverPtr driver, pointer module,
int flags);
extern int
xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min);
extern void DeleteInputDeviceRequest(DeviceIntPtr pDev);
extern void FreeInputAttributes(InputAttributes * attrs);
extern void
xf86PostButtonEvent(DeviceIntPtr device,
int is_absolute,
int button,
int is_down, int first_valuator, int num_valuators, ...);
extern int Xasprintf(char **ret, const char *format, ...);
extern int
XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable);
extern InputInfoPtr xf86FirstLocalDevice(void);
extern void xf86DeleteInput(InputInfoPtr pInp, int flags);
extern XF86OptionPtr xf86OptionListDuplicate(XF86OptionPtr options);
extern Bool
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels,
CARD8 *map);
extern void
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval,
int maxval, int resolution, int min_res, int max_res,
int mode);
extern void
xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down);
extern int
xf86SetIntOption(XF86OptionPtr optlist, const char *name, int deflt);
extern void
xf86PostButtonEventP(DeviceIntPtr device,
int is_absolute,
int button,
int is_down, int first_valuator, int num_valuators,
const int *valuators);
extern Bool
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc);
extern int
XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
int format, int mode, unsigned long len,
XF86OptionPtr value, Bool sendevent);
extern CARD32 GetTimeInMillis(void);
extern int
NewInputDeviceRequest(InputOption *options,
InputAttributes * attrs,
DeviceIntPtr *pdev);
extern Bool
InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc);
extern InputAttributes *DuplicateInputAttributes(InputAttributes * attrs);
extern int ValidAtom(Atom atom);
extern Bool
InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func);
extern long
XIRegisterPropertyHandler(DeviceIntPtr dev,
int (*SetProperty) (DeviceIntPtr dev,
Atom property,
XIPropertyValuePtr prop,
BOOL checkonly),
int (*GetProperty) (DeviceIntPtr dev,
Atom property),
int (*DeleteProperty) (DeviceIntPtr dev,
Atom property));
extern int InitProximityClassDeviceStruct(DeviceIntPtr dev);
extern void xf86Msg(MessageType type, const char *format, ...);
extern void xf86MsgVerb(MessageType type, int verb, const char *format, ...);
extern void xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format,
...);
extern void
xf86PostMotionEventP(DeviceIntPtr device,
int is_absolute, int first_valuator, int num_valuators,
const int *valuators);
extern Bool
InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
int numMotionEvents, int mode);
extern XF86OptionPtr
xf86ReplaceStrOption(XF86OptionPtr optlist, const char *name, const char *val);
extern XF86OptionPtr xf86NextOption(XF86OptionPtr list);
extern int
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value);
extern Atom MakeAtom(const char *string, unsigned len, Bool makeit);
extern int GetMotionHistorySize(void);
extern void
xf86PostProximityEventP(DeviceIntPtr device,
int is_in, int first_valuator, int num_valuators,
const int *valuators);
extern Bool InitFocusClassDeviceStruct(DeviceIntPtr dev);
extern void
xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list);
extern void
xf86CollectInputOptions(InputInfoPtr pInfo,
const char **defaultOpts);
extern InputInfoPtr xf86AllocateInput(void);
extern ClientPtr serverClient;
extern Bool
QueueWorkProc(Bool (*function)
(ClientPtr /* pClient */ , pointer /* closure */ ),
ClientPtr client, pointer closure);

View File

@ -186,6 +186,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBEVDEV_CFLAGS = @LIBEVDEV_CFLAGS@
LIBEVDEV_LIBS = @LIBEVDEV_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -194,15 +196,12 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
MTDEV_CFLAGS = @MTDEV_CFLAGS@
MTDEV_LIBS = @MTDEV_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -301,7 +300,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -326,9 +325,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)