xserver-xorg-input-evdev: Changes to 'debian-experimental'
ChangeLog | 380 +++++++++++++++++++++++++-----
autogen.sh | 4
configure.ac | 3
debian/changelog | 2
src/Makefile.am | 3
src/axis_labels.h | 198 +++++++++++++++
src/emuMB.c | 4
src/emuWheel.c | 2
src/evdev.c | 677 ++++++++++++++++++++++++++----------------------------
src/evdev.h | 10
10 files changed, 872 insertions(+), 411 deletions(-)
New commits:
commit fa931895b62b07b3fec008079fd7028ef9a952ef
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date: Wed Apr 10 09:29:22 2013 +0300
update the changelogs
diff --git a/ChangeLog b/ChangeLog
index a4aa1cc..89834ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,246 @@
-commit 777cfa148f8b5febaab1330e8df791f2188c046b
+commit 5138cd2ff47a1a28db82688b932cb1ecd618778f
Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date: Mon Aug 13 16:22:00 2012 +1000
+Date: Tue Mar 26 16:01:39 2013 +1000
- evdev 2.7.3
+ evdev 2.8.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-commit 447fd220e05752ec9ab388cc78826c297e1b7e24
+commit c085c8b6c1f8e95f6f4d91bc65268fe57154018c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Feb 12 12:58:08 2013 +1000
+
+ Return BadValue if EvdevOpenMTDev fails
+
+ FALSE == Success, so if we fail during EvdevOpenMTDev, the caller thinks
+ that everything worked fine, proceeds to set up the fd, etc.
+
+ This may later cause a crash, when a device comes back later as different
+ device and posts axis events where we didn't configure axes in the first
+ place.
+
+ Note: Unclear why there was no udev event received for the device being
+ removed and coming back as different device though.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 2b675f85aef6df3bb3fb5e68648982e11b752764
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Feb 12 12:48:38 2013 +1000
+
+ Make errors on EVIOCGBIT more obvious
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 2b8b0df62ec554952784f2820fb4143c495232b0
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Jan 24 16:18:48 2013 +1000
+
+ Always init axis mapping for the first two rel axes (#59784)
+
+ Fixes regression introduced in 2f67509b53b27dd7f51ca2aadd19605aee613a61.
+
+ If evdev is used for touchpads, the abs axis movement is converted to a rel
+ movement. Without the two relative axes initialized, the events are
+ discarded.
+
+ Axes 0 and 1 are always x/y anyway unless specifically configured otherwise.
+
+ X.Org Bug 59784 <http://bugs.freedesktop.org/show_bug.cgi?id=59784>
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit bb9b4146cb828bd366675e8736fc145e92c9269a
+Merge: f5fe533 67e5376
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Jan 25 11:12:05 2013 +1000
+
+ Merge branch 'touch-axis-swap'
+
+commit f5fe533f1bef0c636b98658aaf40748c219c9879
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Mar 27 12:18:46 2012 +1000
+
+ Allow relative scroll valuators on absolute devices (#54387)
+
+ Special-case RHEL_WHEEL, RHEL_HWHEEL and REL_DIAL to add scroll valuators
+ for those axes in addition to the absolute axes.
+
+ X.Org Bug 54387 <http://bugs.freedesktop.org/show_bug.cgi?id=54387>
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 2f67509b53b27dd7f51ca2aadd19605aee613a61
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Jan 16 08:38:52 2013 +1000
+
+ Split rel and abs axis mapping into two separate arrays
+
+ This will enable a device to have relative scrolling axes in addition to
+ absolute axes (required by the QEMU tablet).
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit ffc0a34642d5ab573c2ae63c873a5befd8688493
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jan 15 16:15:47 2013 +1000
+
+ Move some stuff into the new alloc function
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 93de7b0b73d4c5f6f68e3a2ffe8f76b5212ee016
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jan 15 16:11:16 2013 +1000
+
+ Move allocation of EvdevRec into a helper function
+
+ Makes it easier to initialise everything to the right values.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 9ec9d214d072ef4aaffb65b5575eff58edcb62ed
+Author: Colin Walters <walters@verbum.org>
+Date: Wed Jan 4 17:37:06 2012 -0500
+
+ autogen.sh: Implement GNOME Build API
+
+ http://people.gnome.org/~walters/docs/build-api.txt
+
+ Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 94e6df8f5f6048b8d0c7aa34efe1c0dc70b997d1
+Author: Adam Jackson <ajax@redhat.com>
+Date: Wed Jan 16 13:11:11 2013 -0500
+
+ configure: Drop AM_MAINTAINER_MODE
+
+ Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 67e5376aaa62a1586fee37d610b3ad7e3b8bbcab
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Jan 14 14:45:58 2013 +1000
+
+ Handle axis swap, calibration, and inversion for touch events (#59340)
+
+ X.Org Bug 59340 <http://bugs.freedesktop.org/show_bug.cgi?id=59340>
+
+ Reported-by: Bastien Nocera <hadess@hadess.net>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 2432626b70b7f55a337bcfdc9ba415811634c062
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Jan 14 14:10:14 2013 +1000
+
+ Move calibration adjustments to helper function
+
+ No functional changes.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 069c035ab0787e6841159929199ae58502d89c4b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Jan 14 14:07:26 2013 +1000
+
+ Move valuator swapping into a helper function
+
+ No functional changes.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 3b7ba39fcaf261f800205fd6cf45fea9998529e5
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Jan 14 14:03:54 2013 +1000
+
+ Localise tmp variable
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 454194f4b530af5d7f92a3b28c28495b4faac547
+Author: Mauro Carvalho Chehab <mchehab@redhat.com>
+Date: Tue Jan 8 15:04:07 2013 +1000
+
+ Force a button if MT axes are present and it is not a gamepad
+
+ We expect at least BTN_TOUCH for anything with MT axes, but devices that
+ don't have that need a button class regardless. Some gamepads define
+ MT axes but no buttons, causing a bug in the server when they post a
+ TouchBegin.
+
+ [ 97436.293] (EE) BUG: triggered 'if (!b || !v)'
+ [ 97436.293] (EE) BUG: exevents.c:929 in UpdateDeviceState()
+
+ So, ignore it, if it is a joystick (e. g. if it have BTN_JOYSTICK defined).
+ Otherwise, fake a button.
+
+ This patch basically merges two patches written by Peter Hutterer
+ <peter.hutterer@who-t.net>.
+
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 00341e632c89e14a83a55e3578b8bb2684ce4ae2
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Jan 7 10:20:52 2013 +1000
+
+ Drop special XKB option handling
+
+ This isn't actually needed at all.
+
+ xf86nameCompare() will skip over underscores and is case-independent. So
+ xf86SetStrOption("foo_bar") will return an Option "FooBar" and vice versa.
+
+ The server won't return a zero-length string either, it'll return
+ NULL and spit a warning to the log.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit f2d2b65343a902c5eedaf50b6f6bcb5ba1ef9c4a
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Jan 7 09:14:42 2013 +1000
+
+ Localise XKB initialization
+
+ No need to store this in the evdev struct.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 0d6c6b59c153cb53b53d6860387b4fe40d245628
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Nov 30 10:32:47 2012 +1000
+
+ If stat fails, pretend it's not a virtual device
+
+ If stat fails while checking if the device is virtual, just say "no, it's
+ not virtual" and continue. If the device really went away, it'll be removed
+ through other means.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c263d6e46d76b3e54570da637b1e7352437bb59d
+Author: Benjamin Tissoires <benjamin.tissoires@gmail.com>
+Date: Fri Oct 26 16:27:35 2012 +0200
+
+ Add missing mt axis labels
+
+ update evdev according to latest changes in input.h
+
+ Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 5af11b675242b2971f47c42a57b892dc24eb1917
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri May 25 13:39:32 2012 +1000
+
+ Use LogMessageVerbSigSafe if available
+
+ Messages logged during the signal handler should use LogMessageVerbSigSafe
+ as of ABI 18.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit 33e7831b5fabc5c9dcc0224800a04761086952a7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Aug 7 14:32:17 2012 +1000
@@ -18,9 +252,8 @@ Date: Tue Aug 7 14:32:17 2012 +1000
X.Org Bug 53168 <http://bugs.freedesktop.org/show_bug.cgi?id=53168>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
- (cherry picked from commit 33e7831b5fabc5c9dcc0224800a04761086952a7)
-commit f2c6da02429eaabf9111d54c41bf46aa19b49776
+commit bc8997e8120cc8d4f33f44e0734fa488f9fef3b0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Sun Aug 5 12:26:38 2012 +1000
@@ -35,9 +268,8 @@ Date: Sun Aug 5 12:26:38 2012 +1000
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit bc8997e8120cc8d4f33f44e0734fa488f9fef3b0)
-commit 9791afc4c16eab92f30884a7e616dd93ac9b7513
+commit 1cb8f074df8d16879ec80d778d26fb5b9af05a3b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jul 31 16:39:00 2012 +1000
@@ -52,17 +284,25 @@ Date: Tue Jul 31 16:39:00 2012 +1000
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit 1cb8f074df8d16879ec80d778d26fb5b9af05a3b)
-commit f1ee12b9a363028c0d0a6668fca9eeb011f2354d
+commit 4eacb581fb71eaf515ec67af0f206126d8328043
Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date: Fri Aug 3 16:00:31 2012 +1000
+Date: Wed Jul 4 10:12:10 2012 +1000
- evdev 2.7.2
+ Only use mtdev for multitouch devices
+
+ mtdev uses a chunk of memory per device (~41kB), mainly for for its
+ internal event buffers. The average box these days can easily have 10
+ devices, but only few of those are multitouch. So check if we have
+ ABS_MT_POSITION axes and only create an mtdev instance if we do.
+
+ If a device has multitouch axes but not x/y, we will ignore events from this
+ device now.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-commit 74690817fcd3e91ea384b8f311d8ce5626d8c409
+commit 98af2003d48530b2e102cf667a9d40dcb94cb0fe
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Jul 4 09:14:41 2012 +1000
@@ -87,66 +327,62 @@ Date: Wed Jul 4 09:14:41 2012 +1000
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit 98af2003d48530b2e102cf667a9d40dcb94cb0fe)
-commit b2cbbb178e9a3650118bdf498e678ca4e12062fe
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date: Mon May 28 10:08:23 2012 +1000
+commit f5ede98085688b59dc56a9cc6592f75552a4e7ed
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Tue Jul 10 00:34:56 2012 +0100
- Constify InputDriverRec->default_options
-
- Removes a warning, and with the input ABI 18 this is forced to const in the
- server.
+ Fix compilation warnings for non-multitouch builds
- Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit 9624f4e2ba7d1973813de066806eed108748a53a)
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-commit 7d91fc7bfcdaaac657aeb7b8876a4002ad0fa68d
-Author: Marcin Slusarz <marcin.slusarz@gmail.com>
-Date: Mon May 21 01:22:33 2012 +0200
+commit ff926d15b8176c5e90fced23bb1aa041c3dca20e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Mar 30 11:21:23 2012 +1000
- Fix some obvious constness-related compile warnings.
+ Move axis labels into a separate header file
+
+ Just to unclutter the code
- Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
- (cherry picked from commit 2c8da280b3ab635d049784345d025d289348687b)
-commit 09987eab9a77aa94127ecacca41498bc5e83c0eb
-Author: Daniel Stone <daniel@fooishbar.org>
-Date: Tue Jul 10 00:34:56 2012 +0100
+commit b0e3c8f97809c8e323783ded0d308c6f0b7729ff
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Mar 29 09:25:43 2012 +1000
- Fix compilation warnings for non-multitouch builds
+ Split initializing one axis label out into a helper function
+
+ We need this for mixed axis devices. No functional changes.
- Signed-off-by: Daniel Stone <daniel@fooishbar.org>
- Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
- (cherry picked from commit f5ede98085688b59dc56a9cc6592f75552a4e7ed)
+ Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-commit 8af0e6f1ebaf327f735bca507134b34bb24b26c6
+commit 9624f4e2ba7d1973813de066806eed108748a53a
Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date: Fri May 25 14:04:22 2012 +1000
+Date: Mon May 28 10:08:23 2012 +1000
- strtol doesn't need a empty string, NULL is good enough.
+ Constify InputDriverRec->default_options
- Fixes:
- evdev.c: In function 'EvdevInitButtonMapping':
- evdev.c:1659:25: warning: initialization discards 'const' qualifier from
- pointer target type [enabled by default]
+ Removes a warning, and with the input ABI 18 this is forced to const in the
+ server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit 61faf2e6e70a4c9ecffe638d46829738dc2e3452)
-commit 56e9a7a248d70fd55ecc3588e72d0172d7c9ad27
+commit 047955f51e013c190bb09ba0c03ca2c160f34997
Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date: Tue Jul 24 14:05:09 2012 +1000
+Date: Mon May 28 09:50:57 2012 +1000
- evdev 2.7.1
+ Move duplicate check up before mtdev allocation
+
+ No need to alloc mtdev if we then find out the fd is a duplicate one anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-commit 7df65237741b167b18ff0962a7bfc3db9d4826ed
+commit 8251d7a8ec00b4160b6601a6f2f4f0f5d461cbee
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon May 28 09:50:15 2012 +1000
@@ -154,9 +390,8 @@ Date: Mon May 28 09:50:15 2012 +1000
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit 8251d7a8ec00b4160b6601a6f2f4f0f5d461cbee)
-commit f4e76a4c53f2abe0bd737485e0b32d6d36425118
+commit ac5173163d7d1e18d47630a397ece0f26b2568c8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon May 28 09:08:43 2012 +1000
@@ -170,9 +405,31 @@ Date: Mon May 28 09:08:43 2012 +1000
Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit ac5173163d7d1e18d47630a397ece0f26b2568c8)
-commit ac772cde9469c406564433d6d41416fa2279fbf9
+commit 61faf2e6e70a4c9ecffe638d46829738dc2e3452
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri May 25 14:04:22 2012 +1000
+
+ strtol doesn't need a empty string, NULL is good enough.
+
+ Fixes:
+ evdev.c: In function 'EvdevInitButtonMapping':
+ evdev.c:1659:25: warning: initialization discards 'const' qualifier from
+ pointer target type [enabled by default]
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit 7f3f98be7f6585de3051ade6d5447acd378b572f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri May 25 13:42:05 2012 +1000
+
+ Use xf86IDrvMsg in emuMB.c instead of ErrorF
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit 4145fe1c087708bf5d6608e328342282ecb93ab0
Author: Chase Douglas <chase.douglas@canonical.com>
Date: Wed Jun 6 12:07:12 2012 -0700
@@ -185,9 +442,8 @@ Date: Wed Jun 6 12:07:12 2012 -0700
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
- (cherry picked from commit 4145fe1c087708bf5d6608e328342282ecb93ab0)
-commit 774915924102c348ce7045ffa07905d1079f447c
+commit 9ce068e760e1282183c7aa1b4cc6b0fcb6b494dd
Author: Chase Douglas <chase.douglas@canonical.com>
Date: Thu May 24 10:48:38 2012 -0700
@@ -199,9 +455,17 @@ Date: Thu May 24 10:48:38 2012 -0700
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
- (cherry picked from commit 9ce068e760e1282183c7aa1b4cc6b0fcb6b494dd)
-commit 833fc517d75934797bdadbf043b18a1c94fc1293
+commit 2c8da280b3ab635d049784345d025d289348687b
+Author: Marcin Slusarz <marcin.slusarz@gmail.com>
+Date: Mon May 21 01:22:33 2012 +0200
+
+ Fix some obvious constness-related compile warnings.
+
+ Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit f28507e8ce2bd45b51c28f024baebd9711c28fc3
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Apr 27 15:42:17 2012 +1000
@@ -216,9 +480,8 @@ Date: Fri Apr 27 15:42:17 2012 +1000
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit f28507e8ce2bd45b51c28f024baebd9711c28fc3)
-commit 4d698d8ece86a8e39b41c03b9b4c427b20b15449
+commit 99340147b9092a5aaec997eca407282a51e1f063
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Mar 15 15:46:32 2012 +1000
@@ -230,7 +493,6 @@ Date: Thu Mar 15 15:46:32 2012 +1000
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
- (cherry picked from commit 99340147b9092a5aaec997eca407282a51e1f063)
commit 76b1d58a9791257fa8b4e6d3322fcb082c86b18a
Author: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/debian/changelog b/debian/changelog
index 3c2bd94..ff49269 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-input-evdev (1:2.7.3-1) UNRELEASED; urgency=low
+xserver-xorg-input-evdev (1:2.8.0-1) UNRELEASED; urgency=low
* New upstream release.
commit 5138cd2ff47a1a28db82688b932cb1ecd618778f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Mar 26 16:01:39 2013 +1000
evdev 2.8.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index f0d0a78..41d1017 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-evdev],
- [2.7.0],
+ [2.8.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-evdev])
AC_CONFIG_SRCDIR([Makefile.am])
commit c085c8b6c1f8e95f6f4d91bc65268fe57154018c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Feb 12 12:58:08 2013 +1000
Return BadValue if EvdevOpenMTDev fails
FALSE == Success, so if we fail during EvdevOpenMTDev, the caller thinks
that everything worked fine, proceeds to set up the fd, etc.
This may later cause a crash, when a device comes back later as different
device and posts axis events where we didn't configure axes in the first
place.
Note: Unclear why there was no udev event received for the device being
removed and coming back as different device though.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/evdev.c b/src/evdev.c
index ea2410b..052e9f0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2511,7 +2511,7 @@ EvdevOpenDevice(InputInfoPtr pInfo)
if (!EvdevOpenMTDev(pInfo)) {
xf86Msg(X_ERROR, "%s: Couldn't open mtdev device\n", pInfo->name);
EvdevCloseDevice(pInfo);
- return FALSE;
+ return BadValue;
}
#endif
commit 2b675f85aef6df3bb3fb5e68648982e11b752764
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Feb 12 12:48:38 2013 +1000
Make errors on EVIOCGBIT more obvious
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/evdev.c b/src/evdev.c
index 731ebb3..ea2410b 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2000,7 +2000,7 @@ EvdevCache(InputInfoPtr pInfo)
len = ioctl(pInfo->fd, EVIOCGBIT(0, sizeof(bitmask)), bitmask);
if (len < 0) {
- xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT failed: %s\n",
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT for bitmask failed: %s\n",
strerror(errno));
goto error;
}
@@ -2009,7 +2009,7 @@ EvdevCache(InputInfoPtr pInfo)
len = ioctl(pInfo->fd, EVIOCGBIT(EV_REL, sizeof(rel_bitmask)), rel_bitmask);
if (len < 0) {
- xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT failed: %s\n",
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT for EV_REL failed: %s\n",
strerror(errno));
goto error;
}
@@ -2018,7 +2018,7 @@ EvdevCache(InputInfoPtr pInfo)
len = ioctl(pInfo->fd, EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask);
if (len < 0) {
- xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT failed: %s\n",
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT for EV_ABS failed: %s\n",
strerror(errno));
goto error;
}
@@ -2027,7 +2027,7 @@ EvdevCache(InputInfoPtr pInfo)
len = ioctl(pInfo->fd, EVIOCGBIT(EV_LED, sizeof(led_bitmask)), led_bitmask);
if (len < 0) {
- xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT failed: %s\n",
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT for EV_LED failed: %s\n",
strerror(errno));
goto error;
}
@@ -2053,7 +2053,7 @@ EvdevCache(InputInfoPtr pInfo)
len = ioctl(pInfo->fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
if (len < 0) {
- xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT failed: %s\n",
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT for EV_KEY failed: %s\n",
strerror(errno));
goto error;
}
@@ -2435,8 +2435,8 @@ EvdevOpenMTDev(InputInfoPtr pInfo)
/* Use ioctl here, this may be called before EvdevCache */
len = ioctl(pInfo->fd, EVIOCGBIT(0, sizeof(bitmask)), bitmask);
if (len < 0) {
- xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT failed: %s\n",
- strerror(errno));
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT for bitmask in %s failed: %s\n",
+ __func__, strerror(errno));
return FALSE;
}
@@ -2445,8 +2445,8 @@ EvdevOpenMTDev(InputInfoPtr pInfo)
len = ioctl(pInfo->fd, EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask);
if (len < 0) {
- xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT failed: %s\n",
- strerror(errno));
+ xf86IDrvMsg(pInfo, X_ERROR, "ioctl EVIOCGBIT for EV_ABS in %s failed: %s\n",
+ __func__, strerror(errno));
return FALSE;
}
commit 2b8b0df62ec554952784f2820fb4143c495232b0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jan 24 16:18:48 2013 +1000
Always init axis mapping for the first two rel axes (#59784)
Fixes regression introduced in 2f67509b53b27dd7f51ca2aadd19605aee613a61.
If evdev is used for touchpads, the abs axis movement is converted to a rel
movement. Without the two relative axes initialized, the events are
discarded.
Axes 0 and 1 are always x/y anyway unless specifically configured otherwise.
X.Org Bug 59784 <http://bugs.freedesktop.org/show_bug.cgi?id=59784>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/evdev.c b/src/evdev.c
index 570dd06..731ebb3 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2576,6 +2576,9 @@ EvdevAlloc(void)
for (i = 0; i < ArrayLength(pEvdev->abs_axis_map); i++)
pEvdev->abs_axis_map[i] = -1;
+ pEvdev->rel_axis_map[0] = 0;
+ pEvdev->rel_axis_map[1] = 1;
+
return pEvdev;
}
@@ -2740,6 +2743,8 @@ static void EvdevInitAxesLabels(EvdevPtr pEvdev, int mode, int natoms, Atom *ato
memset(atoms, 0, natoms * sizeof(Atom));
+ /* rel[0] and [1] are always mapped, so we get the rel labels. if we
+ have abs x/y, the labels will be overwritten with the right one */
for (axis = 0; axis < ArrayLength(rel_labels); axis++)
EvdevInitOneAxisLabel(pEvdev, pEvdev->rel_axis_map[axis], rel_labels, axis, atoms);
commit f5fe533f1bef0c636b98658aaf40748c219c9879
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Mar 27 12:18:46 2012 +1000
Allow relative scroll valuators on absolute devices (#54387)
Special-case RHEL_WHEEL, RHEL_HWHEEL and REL_DIAL to add scroll valuators
for those axes in addition to the absolute axes.
X.Org Bug 54387 <http://bugs.freedesktop.org/show_bug.cgi?id=54387>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/evdev.c b/src/evdev.c
index 9741821..c25bea4 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -692,7 +692,9 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
#endif
default:
/* Ignore EV_REL events if we never set up for them. */
- if (!(pEvdev->flags & EVDEV_RELATIVE_EVENTS))
+ if (!(pEvdev->flags & EVDEV_RELATIVE_EVENTS) &&
+ ev->code != REL_WHEEL && ev->code != REL_DIAL &&
+ ev->code != REL_HWHEEL)
return;
/* Handle mouse wheel emulation */
@@ -1215,7 +1217,7 @@ is_blacklisted_axis(int axis)
static int
-EvdevAddAbsValuatorClass(DeviceIntPtr device)
+EvdevAddAbsValuatorClass(DeviceIntPtr device, int want_scroll_axes)
{
InputInfoPtr pInfo;
EvdevPtr pEvdev;
@@ -1224,6 +1226,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
num_mt_axes_total = 0; /* total number of MT axes, including
double-counted ones, excluding blacklisted */
Atom *atoms;
+ int mapping = 0;
pInfo = device->public.devicePrivate;
pEvdev = pInfo->private;
@@ -1263,6 +1266,19 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
}
}
#endif
+
+#ifdef HAVE_SMOOTH_SCROLLING
+ if (want_scroll_axes && EvdevBitIsSet(pEvdev->bitmask, EV_REL))
+ {
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_WHEEL))
+ num_axes++;
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_HWHEEL))
+ num_axes++;
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_DIAL))
+ num_axes++;
+ }
+#endif
+
if (num_axes + num_mt_axes > MAX_VALUATORS) {
xf86IDrvMsg(pInfo, X_WARNING, "found %d axes, limiting to %d.\n", num_axes, MAX_VALUATORS);
num_axes = MAX_VALUATORS;
@@ -1329,7 +1345,6 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
#ifdef MULTITOUCH
int j;
#endif
- int mapping;
pEvdev->abs_axis_map[axis] = -1;
if (!EvdevBitIsSet(pEvdev->abs_bitmask, axis) ||
is_blacklisted_axis(axis))
@@ -1352,6 +1367,20 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
i++;
}
+#ifdef HAVE_SMOOTH_SCROLLING
+ if (want_scroll_axes)
+ {
+ mapping++; /* continue from abs axis mapping */
+
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_HWHEEL))
+ pEvdev->rel_axis_map[REL_HWHEEL] = mapping++;
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_DIAL))
+ pEvdev->rel_axis_map[REL_DIAL] = mapping++;
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_WHEEL))
+ pEvdev->rel_axis_map[REL_WHEEL] = mapping++;
+ }
+#endif
+
EvdevInitAxesLabels(pEvdev, Absolute, pEvdev->num_vals + num_mt_axes, atoms);
if (!InitValuatorClassDeviceStruct(device, num_axes + num_mt_axes, atoms,
@@ -1446,6 +1475,51 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
}
#endif
+#ifdef HAVE_SMOOTH_SCROLLING
+ if (want_scroll_axes)
+ {
+ int idx;
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_WHEEL))
+ {
+ idx = REL_WHEEL;
+ xf86InitValuatorAxisStruct(device,
+ pEvdev->rel_axis_map[idx],
+ atoms[pEvdev->rel_axis_map[idx]],
+ NO_AXIS_LIMITS, NO_AXIS_LIMITS,
+ 0, 0, 0, Relative);
+ SetScrollValuator(device, pEvdev->rel_axis_map[idx],
+ SCROLL_TYPE_VERTICAL, -1.0,
+ SCROLL_FLAG_PREFERRED);
+ }
+
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_HWHEEL))
+ {
+ idx = REL_HWHEEL;
+ xf86InitValuatorAxisStruct(device,
+ pEvdev->rel_axis_map[idx],
+ atoms[pEvdev->rel_axis_map[idx]],
+ NO_AXIS_LIMITS, NO_AXIS_LIMITS,
+ 0, 0, 0, Relative);
+ SetScrollValuator(device, pEvdev->rel_axis_map[idx],
+ SCROLL_TYPE_HORIZONTAL, 1.0,
+ SCROLL_FLAG_NONE);
+ }
+
+ if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_DIAL))
+ {
+ idx = REL_DIAL;
+ xf86InitValuatorAxisStruct(device,
+ pEvdev->rel_axis_map[idx],
+ atoms[pEvdev->rel_axis_map[idx]],
+ NO_AXIS_LIMITS, NO_AXIS_LIMITS,
+ 0, 0, 0, Relative);
+ SetScrollValuator(device, pEvdev->rel_axis_map[idx],
+ SCROLL_TYPE_HORIZONTAL, 1.0,
+ SCROLL_FLAG_NONE);
+ }
+ }
+#endif
+
free(atoms);
for (i = 0; i < ArrayLength(proximity_bits); i++)
@@ -1675,12 +1749,16 @@ static void
EvdevInitAnyValuators(DeviceIntPtr device, EvdevPtr pEvdev)
{
InputInfoPtr pInfo = device->public.devicePrivate;
+ int rel_success = FALSE;
if (pEvdev->flags & EVDEV_RELATIVE_EVENTS &&
EvdevAddRelValuatorClass(device) == Success)
+ {
+ rel_success = TRUE;
xf86IDrvMsg(pInfo, X_INFO, "initialized for relative axes.\n");
+ }
if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS &&
- EvdevAddAbsValuatorClass(device) == Success)
+ EvdevAddAbsValuatorClass(device, !rel_success) == Success)
xf86IDrvMsg(pInfo, X_INFO, "initialized for absolute axes.\n");
}
@@ -1689,7 +1767,7 @@ EvdevInitAbsValuators(DeviceIntPtr device, EvdevPtr pEvdev)
{
InputInfoPtr pInfo = device->public.devicePrivate;
- if (EvdevAddAbsValuatorClass(device) == Success) {
+ if (EvdevAddAbsValuatorClass(device, TRUE) == Success) {
xf86IDrvMsg(pInfo, X_INFO,"initialized for absolute axes.\n");
} else {
xf86IDrvMsg(pInfo, X_ERROR,"failed to initialize for absolute axes.\n");
commit 2f67509b53b27dd7f51ca2aadd19605aee613a61
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Jan 16 08:38:52 2013 +1000
Split rel and abs axis mapping into two separate arrays
This will enable a device to have relative scrolling axes in addition to
absolute axes (required by the QEMU tablet).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/emuWheel.c b/src/emuWheel.c
index db989c5..5774930 100644
--- a/src/emuWheel.c
+++ b/src/emuWheel.c
@@ -117,7 +117,7 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv)
/* We don't want to intercept real mouse wheel events */
if(pEv->type == EV_ABS) {
- int axis = pEvdev->axis_map[pEv->code];
+ int axis = pEvdev->abs_axis_map[pEv->code];
oldValue = valuator_mask_get(pEvdev->vals, axis);
valuator_mask_set(pEvdev->vals, axis, value);
value -= oldValue; /* make value into a differential measurement */
diff --git a/src/evdev.c b/src/evdev.c
index a9b1fd2..9741821 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -123,7 +123,7 @@ static int EvdevOpenDevice(InputInfoPtr pInfo);
static void EvdevCloseDevice(InputInfoPtr pInfo);
static void EvdevInitAxesLabels(EvdevPtr pEvdev, int mode, int natoms, Atom *atoms);
-static void EvdevInitOneAxisLabel(EvdevPtr pEvdev, int axis,
+static void EvdevInitOneAxisLabel(EvdevPtr pEvdev, int mapped_axis,
const char **labels, int label_idx, Atom *atoms);
static void EvdevInitButtonLabels(EvdevPtr pEvdev, int natoms, Atom *atoms);
static void EvdevInitProperty(DeviceIntPtr dev);
@@ -479,7 +479,7 @@ EvdevProcessValuators(InputInfoPtr pInfo)
for (i = 0; i < REL_CNT; i++)
{
- int map = pEvdev->axis_map[i];
+ int map = pEvdev->rel_axis_map[i];
if (pEvdev->delta[i] && map != -1)
valuator_mask_set(pEvdev->vals, map, pEvdev->delta[i]);
}
@@ -701,7 +701,7 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
pEvdev->rel_queued = 1;
pEvdev->delta[ev->code] += value;
- map = pEvdev->axis_map[ev->code];
+ map = pEvdev->rel_axis_map[ev->code];
valuator_mask_set(pEvdev->vals, map, value);
break;
}
@@ -787,7 +787,7 @@ EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev)
} else
pEvdev->slot_state = SLOTSTATE_CLOSE;
} else {
- map = pEvdev->axis_map[ev->code];
+ map = pEvdev->abs_axis_map[ev->code];
valuator_mask_set(pEvdev->mt_mask, map, ev->value);
if (slot_index >= 0)
valuator_mask_set(pEvdev->last_mt_vals[slot_index], map,
@@ -827,7 +827,7 @@ EvdevProcessAbsoluteMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
EvdevProcessTouchEvent(pInfo, ev);
pEvdev->abs_queued = 1;
} else if (!pEvdev->mt_mask) {
- map = pEvdev->axis_map[ev->code];
+ map = pEvdev->abs_axis_map[ev->code];
valuator_mask_set(pEvdev->vals, map, value);
pEvdev->abs_queued = 1;
}
@@ -1330,7 +1330,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
int j;
#endif
int mapping;
- pEvdev->axis_map[axis] = -1;
+ pEvdev->abs_axis_map[axis] = -1;
if (!EvdevBitIsSet(pEvdev->abs_bitmask, axis) ||
is_blacklisted_axis(axis))
continue;
@@ -1347,7 +1347,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
mapping = mt_axis_mappings[j].mapping;
}
#endif
- pEvdev->axis_map[axis] = mapping;
+ pEvdev->abs_axis_map[axis] = mapping;
if (mapping == i)
i++;
}
@@ -1380,11 +1380,11 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
for (i = 0; i < num_slots(pEvdev); i++) {
for (axis = ABS_MT_TOUCH_MAJOR; axis < ABS_MAX; axis++) {
- if (pEvdev->axis_map[axis] >= 0) {
+ if (pEvdev->abs_axis_map[axis] >= 0) {
/* XXX: read initial values from mtdev when it adds support
* for doing so. */
valuator_mask_set(pEvdev->last_mt_vals[i],
- pEvdev->axis_map[axis], 0);
+ pEvdev->abs_axis_map[axis], 0);
}
}
}
@@ -1392,7 +1392,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
#endif
for (axis = ABS_X; axis < ABS_MT_SLOT; axis++) {
- int axnum = pEvdev->axis_map[axis];
+ int axnum = pEvdev->abs_axis_map[axis];
int resolution = 0;
if (axnum == -1)
@@ -1414,7 +1414,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device)
#ifdef MULTITOUCH
for (axis = ABS_MT_TOUCH_MAJOR; axis <= ABS_MAX; axis++) {
- int axnum = pEvdev->axis_map[axis];
Reply to: