Hello community,
here is the log from the commit of package xf86-input-evdev for openSUSE:Factory checked in at 2013-01-17 10:59:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-input-evdev (Old)
and /work/SRC/openSUSE:Factory/.xf86-input-evdev.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-input-evdev", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-input-evdev/xf86-input-evdev.changes 2012-12-07 14:58:59.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xf86-input-evdev.new/xf86-input-evdev.changes 2013-01-17 10:59:27.000000000 +0100
@@ -1,0 +2,9 @@
+Tue Jan 15 15:22:22 UTC 2013 - msrb@suse.com
+
+- evdev_handle-axis-swap-calibration-and-inversion-for-touch-events.patch,
+ evdev_move-calibration-asjustments-to-helper-function.patch,
+ evdev_move-valuator-swapping-into-a-helper-function.patch
+ * Handle axis swap, calibration and inversion for touch events
+ (bnc#785508)
+
+-------------------------------------------------------------------
New:
----
evdev_handle-axis-swap-calibration-and-inversion-for-touch-events.patch
evdev_move-calibration-asjustments-to-helper-function.patch
evdev_move-valuator-swapping-into-a-helper-function.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xf86-input-evdev.spec ++++++
--- /var/tmp/diff_new_pack.pSoiwq/_old 2013-01-17 10:59:28.000000000 +0100
+++ /var/tmp/diff_new_pack.pSoiwq/_new 2013-01-17 10:59:28.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package xf86-input-evdev
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,9 @@
Group: System/X11/Servers/XF86_4
Url: http://xorg.freedesktop.org/
Source0: http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.tar.bz2
+Patch0: evdev_move-valuator-swapping-into-a-helper-function.patch
+Patch1: evdev_move-calibration-asjustments-to-helper-function.patch
+Patch2: evdev_handle-axis-swap-calibration-and-inversion-for-touch-events.patch
#BuildRequires: autoconf >= 2.60
#BuildRequires: automake
#BuildRequires: libtool
@@ -59,6 +62,9 @@
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%build
%configure
++++++ evdev_handle-axis-swap-calibration-and-inversion-for-touch-events.patch ++++++
Author: Peter Hutterer
Subject: Handle axis swap, calibration, and inversion for touch events (#59340)
Patch-Mainline: Upstream
References: fdo#59340 bnc#785508
X.Org Bug 59340 http://bugs.freedesktop.org/show_bug.cgi?id=59340
Reported-by: Bastien Nocera
Signed-off-by: Peter Hutterer
Signed-off-by: Michal Srb
---
src/evdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/evdev.c b/src/evdev.c
index 1581d47..c689257 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -744,6 +744,9 @@ EvdevProcessTouch(InputInfoPtr pInfo)
type = XI_TouchUpdate;
+ EvdevSwapAbsValuators(pEvdev, pEvdev->mt_mask);
+ EvdevApplyCalibration(pEvdev, pEvdev->mt_mask);
+
EvdevQueueTouchEvent(pInfo, pEvdev->cur_slot, pEvdev->mt_mask, type);
pEvdev->slot_state = SLOTSTATE_EMPTY;
--
1.8.1
++++++ evdev_move-calibration-asjustments-to-helper-function.patch ++++++
Author: Peter Hutterer
Subject: Move calibration adjustments to helper function
Patch-Mainline: Upstream
References: fdo#59340 bnc#785508
No functional changes.
Signed-off-by: Peter Hutterer
Signed-off-by: Michal Srb
---
src/evdev.c | 69 +++++++++++++++++++++++++++++++++----------------------------
1 file changed, 37 insertions(+), 32 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index f061324..1581d47 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -448,6 +448,42 @@ EvdevSwapAbsValuators(EvdevPtr pEvdev, ValuatorMask *mask)
}
}
+static void
+EvdevApplyCalibration(EvdevPtr pEvdev, ValuatorMask *mask)
+{
+ int i;
+
+ for (i = 0; i <= 1; i++) {
+ int val;
+ int calib_min;
+ int calib_max;
+
+ if (!valuator_mask_isset(mask, i))
+ continue;
+
+ val = valuator_mask_get(mask, i);
+
+ if (i == 0) {
+ calib_min = pEvdev->calibration.min_x;
+ calib_max = pEvdev->calibration.max_x;
+ } else {
+ calib_min = pEvdev->calibration.min_y;
+ calib_max = pEvdev->calibration.max_y;
+ }
+
+ if (pEvdev->flags & EVDEV_CALIBRATED)
+ val = xf86ScaleAxis(val, pEvdev->absinfo[i].maximum,
+ pEvdev->absinfo[i].minimum, calib_max,
+ calib_min);
+
+ if ((i == 0 && pEvdev->invert_x) || (i == 1 && pEvdev->invert_y))
+ val = (pEvdev->absinfo[i].maximum - val +
+ pEvdev->absinfo[i].minimum);
+
+ valuator_mask_set(mask, i, val);
+ }
+}
+
/**
* Take the valuators and process them accordingly.
*/
@@ -524,39 +560,8 @@ EvdevProcessValuators(InputInfoPtr pInfo)
* just works.
*/
else if (pEvdev->abs_queued && pEvdev->in_proximity) {
- int i;
-
EvdevSwapAbsValuators(pEvdev, pEvdev->vals);
-
- for (i = 0; i <= 1; i++) {
- int val;
- int calib_min;
- int calib_max;
-
- if (!valuator_mask_isset(pEvdev->vals, i))
- continue;
-
- val = valuator_mask_get(pEvdev->vals, i);
-
- if (i == 0) {
- calib_min = pEvdev->calibration.min_x;
- calib_max = pEvdev->calibration.max_x;
- } else {
- calib_min = pEvdev->calibration.min_y;
- calib_max = pEvdev->calibration.max_y;
- }
-
- if (pEvdev->flags & EVDEV_CALIBRATED)
- val = xf86ScaleAxis(val, pEvdev->absinfo[i].maximum,
- pEvdev->absinfo[i].minimum, calib_max,
- calib_min);
-
- if ((i == 0 && pEvdev->invert_x) || (i == 1 && pEvdev->invert_y))
- val = (pEvdev->absinfo[i].maximum - val +
- pEvdev->absinfo[i].minimum);
-
- valuator_mask_set(pEvdev->vals, i, val);
- }
+ EvdevApplyCalibration(pEvdev, pEvdev->vals);
Evdev3BEmuProcessAbsMotion(pInfo, pEvdev->vals);
}
}
--
1.8.1++++++ evdev_move-valuator-swapping-into-a-helper-function.patch ++++++
Author: Peter Hutterer
Subject: Move valuator swapping into a helper function
Patch-Mainline: Upstream
References: fdo#59340 bnc#785508
No functional changes.
Signed-off-by: Peter Hutterer
Signed-off-by: Michal Srb
---
src/evdev.c | 52 +++++++++++++++++++++++++++++++---------------------
1 file changed, 31 insertions(+), 21 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index dfce8c4..f061324 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -418,6 +418,36 @@ EvdevQueueButtonClicks(InputInfoPtr pInfo, int button, int count)
}
}
+static void
+EvdevSwapAbsValuators(EvdevPtr pEvdev, ValuatorMask *mask)
+{
+ int i;
+ int swapped_isset[2] = {0, 0};
+ int swapped_values[2];
+
+ if (!pEvdev->swap_axes)
+ return;
+
+ for(i = 0; i <= 1; i++) {
+ if (valuator_mask_isset(mask, i)) {
+ swapped_isset[1 - i] = 1;
+ swapped_values[1 - i] =
+ xf86ScaleAxis(valuator_mask_get(mask, i),
+ pEvdev->absinfo[1 - i].maximum,
+ pEvdev->absinfo[1 - i].minimum,
+ pEvdev->absinfo[i].maximum,
+ pEvdev->absinfo[i].minimum);
+ }
+ }
+
+ for (i = 0; i <= 1; i++) {
+ if (swapped_isset[i])
+ valuator_mask_set(mask, i, swapped_values[i]);
+ else
+ valuator_mask_unset(mask, i);
+ }
+}
+
/**
* Take the valuators and process them accordingly.
*/
@@ -496,27 +526,7 @@ EvdevProcessValuators(InputInfoPtr pInfo)
else if (pEvdev->abs_queued && pEvdev->in_proximity) {
int i;
- if (pEvdev->swap_axes) {
- int swapped_isset[2] = {0, 0};
- int swapped_values[2];
-
- for(i = 0; i <= 1; i++)
- if (valuator_mask_isset(pEvdev->vals, i)) {
- swapped_isset[1 - i] = 1;
- swapped_values[1 - i] =
- xf86ScaleAxis(valuator_mask_get(pEvdev->vals, i),
- pEvdev->absinfo[1 - i].maximum,
- pEvdev->absinfo[1 - i].minimum,
- pEvdev->absinfo[i].maximum,
- pEvdev->absinfo[i].minimum);
- }
-
- for (i = 0; i <= 1; i++)
- if (swapped_isset[i])
- valuator_mask_set(pEvdev->vals, i, swapped_values[i]);
- else
- valuator_mask_unset(pEvdev->vals, i);
- }
+ EvdevSwapAbsValuators(pEvdev, pEvdev->vals);
for (i = 0; i <= 1; i++) {
int val;
--
1.8.1
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org