aboutsummaryrefslogtreecommitdiff
path: root/src/evdev_axes.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@fido2.homeip.net>2007-02-10 22:17:01 -0800
committerPhilip Langdale <philipl@fido2.homeip.net>2007-02-10 22:17:01 -0800
commit24f9e67a8f9729fa7cb10f0479a3be9c16c5d13a (patch)
tree54449d226fc4de91bd8f85f6355603930ece5442 /src/evdev_axes.c
parentFor reasons related to handling pathological remapping cases, and (diff)
downloadxf86-input-evdev-24f9e67a8f9729fa7cb10f0479a3be9c16c5d13a.tar.gz
xf86-input-evdev-24f9e67a8f9729fa7cb10f0479a3be9c16c5d13a.tar.bz2
xf86-input-evdev-24f9e67a8f9729fa7cb10f0479a3be9c16c5d13a.zip
Stop caching the screen size for scaling.
Do be able to correctly scale absolute inputs, the actual screen size must be used as this changes when the screen resizes.
Diffstat (limited to 'src/evdev_axes.c')
-rw-r--r--src/evdev_axes.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/evdev_axes.c b/src/evdev_axes.c
index 9d2ef20..cab9784 100644
--- a/src/evdev_axes.c
+++ b/src/evdev_axes.c
@@ -276,11 +276,14 @@ EvdevAxesAbsSynRep (InputInfoPtr pInfo)
skip_xy = 1;
} else if (state->mode == Absolute && state->abs->screen != -1 && state->abs->axes >= 2) {
int conv_x, conv_y;
+ int scale[2];
+
+ scale[0] = screenInfo.screens[state->abs->screen]->width;
+ scale[1] = screenInfo.screens[state->abs->screen]->height;
for (i = 0; i < 2; i++)
state->axes->v[i] = xf86ScaleAxis (state->abs->v[i],
- 0, state->abs->scale[i],
- state->abs->min[i], state->abs->max[i]);
+ 0, scale[i], state->abs->min[i], state->abs->max[i]);
EvdevConvert (pInfo, 0, 2, state->abs->v[0], state->abs->v[1],
@@ -504,9 +507,6 @@ EvdevAxisAbsNew1(InputInfoPtr pInfo)
if (k < screenInfo.numScreens && k >= 0) {
state->abs->screen = k;
xf86Msg(X_CONFIG, "%s: AbsoluteScreen: %d.\n", pInfo->name, k);
-
- state->abs->scale[0] = screenInfo.screens[state->abs->screen]->width;
- state->abs->scale[1] = screenInfo.screens[state->abs->screen]->height;
} else {
if (k != -1)
xf86Msg(X_CONFIG, "%s: AbsoluteScreen: %d is not a valid screen.\n", pInfo->name, k);