only force relative x/y to exists if we don't have ABS_X/Y (#784391)
This commit is contained in:
parent
c62d28205d
commit
d61fb7e076
65
0001-Only-force-REL_X-Y-if-no-ABS_X-Y-exists.patch
Normal file
65
0001-Only-force-REL_X-Y-if-no-ABS_X-Y-exists.patch
Normal file
@ -0,0 +1,65 @@
|
||||
From 7959e63ecff07a4e0c3e2463b1697739a250a9ec Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed, 25 Jan 2012 16:03:34 +1000
|
||||
Subject: [PATCH] Only force REL_X/Y if no ABS_X/Y exists
|
||||
|
||||
5c5b2c8db851df7921cedd888222a6630a007fd8 added forced x/y axes if a device
|
||||
has any axes of the same mode. This was too broad a brush, some devices have
|
||||
a relative wheel but absolute x/y axes and would now get misdetected as
|
||||
purely relative device.
|
||||
|
||||
Only force relative axes if a device no rel x/y _and_ no abs x/y.
|
||||
|
||||
Reproducible: virtual machine with QEMU USB Tablet will stop working
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
src/evdev.c | 18 ++++++++++--------
|
||||
1 files changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/evdev.c b/src/evdev.c
|
||||
index 32fe38b..a6f9a59 100644
|
||||
--- a/src/evdev.c
|
||||
+++ b/src/evdev.c
|
||||
@@ -2125,6 +2125,13 @@ EvdevProbe(InputInfoPtr pInfo)
|
||||
}
|
||||
}
|
||||
|
||||
+ for (i = 0; i < ABS_MAX; i++) {
|
||||
+ if (EvdevBitIsSet(pEvdev->abs_bitmask, i)) {
|
||||
+ has_abs_axes = TRUE;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (has_rel_axes) {
|
||||
if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_WHEEL) ||
|
||||
EvdevBitIsSet(pEvdev->rel_bitmask, REL_HWHEEL) ||
|
||||
@@ -2146,7 +2153,9 @@ EvdevProbe(InputInfoPtr pInfo)
|
||||
if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_X) &&
|
||||
EvdevBitIsSet(pEvdev->rel_bitmask, REL_Y)) {
|
||||
xf86IDrvMsg(pInfo, X_PROBED, "Found x and y relative axes\n");
|
||||
- } else
|
||||
+ } else if (!has_abs_axes ||
|
||||
+ !EvdevBitIsSet(pEvdev->abs_bitmask, ABS_X) ||
|
||||
+ !EvdevBitIsSet(pEvdev->abs_bitmask, ABS_Y))
|
||||
EvdevForceXY(pInfo, Relative);
|
||||
} else {
|
||||
xf86IDrvMsg(pInfo, X_INFO, "Relative axes present but ignored.\n");
|
||||
@@ -2154,13 +2163,6 @@ EvdevProbe(InputInfoPtr pInfo)
|
||||
}
|
||||
}
|
||||
|
||||
- for (i = 0; i < ABS_MAX; i++) {
|
||||
- if (EvdevBitIsSet(pEvdev->abs_bitmask, i)) {
|
||||
- has_abs_axes = TRUE;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
#ifdef MULTITOUCH
|
||||
for (i = ABS_MT_SLOT; i < ABS_MAX; i++) {
|
||||
if (EvdevBitIsSet(pEvdev->abs_bitmask, i)) {
|
||||
--
|
||||
1.7.7.5
|
||||
|
@ -8,7 +8,7 @@
|
||||
Summary: Xorg X11 evdev input driver
|
||||
Name: xorg-x11-drv-evdev
|
||||
Version: 2.6.99.901
|
||||
Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
|
||||
Release: 7%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X Hardware Support
|
||||
@ -21,6 +21,9 @@ Source2: commitid
|
||||
Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
|
||||
%endif
|
||||
|
||||
# Bug 784391 - 2.6.99.901-5 breaks mouse in F16 KVM guest
|
||||
Patch01: 0001-Only-force-REL_X-Y-if-no-ABS_X-Y-exists.patch
|
||||
|
||||
ExcludeArch: s390 s390x
|
||||
|
||||
BuildRequires: autoconf automake libtool
|
||||
@ -38,6 +41,7 @@ X.Org X11 evdev input driver.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
|
||||
%patch01 -p1
|
||||
|
||||
%build
|
||||
autoreconf -v --install || exit 1
|
||||
@ -79,6 +83,9 @@ X.Org X11 evdev input driver development files.
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 25 2012 Peter Hutterer <peter.hutterer@redhat.com> 2.6.99.901-7.20120118git9d9c9870c
|
||||
- only force relative x/y to exists if we don't have ABS_X/Y (#784391)
|
||||
|
||||
* Mon Jan 23 2012 Peter Hutterer <peter.hutterer@redhat.com> - 2.6.99.901-6.20120118git9d9c9870c
|
||||
- ABI rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user