summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-05-02 10:11:30 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-02 10:11:30 +1000
commit8bd216f0a53b265011de5074a0ca384eefe69883 (patch)
treeb08f92ef02929792df2d51c4dc415127315224f7
parentd0970bd06aa4e274a187285821a0e2c4652948ce (diff)
server/input: update expected coords for transformation matrix test
This matches the proposed server patch now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tests/server/input.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/server/input.cpp b/tests/server/input.cpp
index bdac83d..7a5ca21 100644
--- a/tests/server/input.cpp
+++ b/tests/server/input.cpp
@@ -1025,6 +1025,8 @@ TEST_P(PointerAbsoluteTransformationMatrixTest, XI2ValuatorData)
switch (mtype) {
/* no matrix, we expect the device range */
case IDENTITY:
+ if (nscreens == 2)
+ expected_maxx = maxx - 1;
break;
/* left half we expect the device to go min-max/2 on a single-screen
setup. dual-screen is per-device range*/
@@ -1038,7 +1040,7 @@ TEST_P(PointerAbsoluteTransformationMatrixTest, XI2ValuatorData)
that (see the scaling formula) */
case RIGHT_HALF:
if (nscreens == 1)
- expected_minx = w/2.0 * maxx/(w-1);
+ expected_minx = w/2.0 * (maxx + 1)/w;
else {
/* problem: scale to desktop == 1024
re-scale to device == doesn't give us minx because the
@@ -1057,6 +1059,7 @@ TEST_P(PointerAbsoluteTransformationMatrixTest, XI2ValuatorData)
on the device.
*/
expected_minx = maxx/(w-1);
+ expected_maxx = maxx - 1;
}
break;
}