[xorg-x11-server] Fix erroneous valuator 1 coordinate when an absolute device in relative
Peter Hutterer
whot at fedoraproject.org
Mon Jul 22 04:13:07 UTC 2013
commit b89d79702f76e37422c44366f5e9c419adc266a7
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Jul 22 14:12:30 2013 +1000
Fix erroneous valuator 1 coordinate when an absolute device in relative
mode doesn't send y coordinates.
...-valuator-mask-to-ensure-XI-1.x-events-ha.patch | 40 ++++++++++++++++++++
xorg-x11-server.spec | 9 ++++-
2 files changed, 48 insertions(+), 1 deletions(-)
---
diff --git a/0001-dix-set-the-valuator-mask-to-ensure-XI-1.x-events-ha.patch b/0001-dix-set-the-valuator-mask-to-ensure-XI-1.x-events-ha.patch
new file mode 100644
index 0000000..51c1b5c
--- /dev/null
+++ b/0001-dix-set-the-valuator-mask-to-ensure-XI-1.x-events-ha.patch
@@ -0,0 +1,40 @@
+From f252f62a27f76c33b49e1d14d34c9683fa695f57 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Mon, 22 Jul 2013 13:43:07 +1000
+Subject: [PATCH] dix: set the valuator mask to ensure XI 1.x events have data
+
+XI 1.x only allows for first + num valuators, so if a device sends data for
+valuators 0 and 2+ only (i.e. valuator 1 is missing) we still need to get
+the data for that from somewhere.
+XI 1.x uses the hack of an unset valuator mask to get the right coordinates,
+i.e. we set the value but don't set the mask for it so XI2 events have the
+right mask.
+
+For an absolute device in relative mode, this broke in b28a1af55cf, the
+value was now always 0. This wasn't visible on the cursor, only in an XI 1.x
+client. The GIMP e.g. sees jumps to x/0 every few events.
+
+Drop the condition introduced in b28a1af55cf, data in valuators is always
+absolute, regardless of the mode.
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+ dix/getevents.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dix/getevents.c b/dix/getevents.c
+index f5ab8c4..14b65ca 100644
+--- a/dix/getevents.c
++++ b/dix/getevents.c
+@@ -239,7 +239,7 @@ set_valuators(DeviceIntPtr dev, DeviceEvent *event, ValuatorMask *mask)
+ SetBit(event->valuators.mode, i);
+ event->valuators.data[i] = valuator_mask_get_double(mask, i);
+ }
+- else if (valuator_get_mode(dev, i) == Absolute)
++ else
+ event->valuators.data[i] = dev->valuator->axisVal[i];
+ }
+ }
+--
+1.8.2.1
+
diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec
index 05cf1cd..691f0b3 100644
--- a/xorg-x11-server.spec
+++ b/xorg-x11-server.spec
@@ -42,7 +42,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.14.2
-Release: 6%{?gitdate:.%{gitdate}}%{dist}
+Release: 7%{?gitdate:.%{gitdate}}%{dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@@ -154,6 +154,9 @@ Patch8036: 0001-glx-fix-uninitialized-var-in-__glXDRIscreenProbe.patch
# Bug 962572 - X-sandboxes are not resizeable
Patch8038: 0001-ephyr-Add-resizeable-option.patch
+# Fix cursor jumps in gimp
+Patch8039: 0001-dix-set-the-valuator-mask-to-ensure-XI-1.x-events-ha.patch
+
# upstream in -next for 1.15, e21e183059df5975e7086850d1931edb2c1bbd06
%if !0%{?rhel}
Patch7071: 0001-os-use-libunwind-to-generate-backtraces.patch
@@ -631,6 +634,10 @@ rm -rf $RPM_BUILD_ROOT
%{xserver_source_dir}
%changelog
+* Mon Jul 22 2013 Peter Hutterer <peter.hutterer at redhat.com> 1.14.2-7
+- Fix erroneous valuator 1 coordinate when an absolute device in relative
+ mode doesn't send y coordinates.
+
* Fri Jul 19 2013 Peter Hutterer <peter.hutterer at redhat.com> 1.14.2-6
- Add new version of the resolution-based scaling patch - scale y down
instead of x up. That gives almost the same behaviour as current
More information about the scm-commits
mailing list