summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArrigo Marchiori <ardovm@yahoo.it>2008-06-22 18:00:57 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-06-22 18:00:57 +0930
commit8a9ff94e3db692736f86d52e569f65f6f363b0e0 (patch)
treefde885e3bf0369642f065ac742f69d8198e7217a
parent5e1c22ff2c21cd20b204394731e2ad8ce1980091 (diff)
Fix scaling behaviour if the axes are swapped. #13535
First swapping, then inverting and scaling. I think it's the most intuitive solution to the problem, because it makes minX, maxX & co. act on the _actual_ X and Y axes, from the user/developer point of view. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> X.Org Bug 13535 <http://bugs.freedesktop.org/show_bug.cgi?id=13535>
-rw-r--r--src/xf86PM.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xf86PM.c b/src/xf86PM.c
index 7c65ee3..b268393 100644
--- a/src/xf86PM.c
+++ b/src/xf86PM.c
@@ -685,15 +685,15 @@ DMC9000_ReadInput (InputInfoPtr pInfo)
}
x = ((((unsigned int) (priv->packet[1]&0x07)) << 7) | (priv->packet[2]&0x7F));
y = ((((unsigned int) (priv->packet[3]&0x07)) << 7) | (priv->packet[4]&0x7F));
- if (priv->invert_y)
- {
- y = priv->max_y - y;
- }
if ( priv->swap_xy)
{
tmp = y;
y = x;
- x = tmp;
+ x = tmp;
+ }
+ if (priv->invert_y)
+ {
+ y = priv->max_y - y;
}
priv->packet[0] = priv->pen_down ? 0x01 : 0x00;