summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@openbsd.org>2009-11-25 19:31:35 +0000
committerMatthieu Herrb <matthieu@openbsd.org>2009-11-25 19:31:35 +0000
commitf9bf833b13153f96720a2b4d7b5549dcc8f36509 (patch)
tree2131a17ace1bff7833e9f0d2021915f6166aa0c8
parentc86cdeaa96e55a3fa3b8914e3575704850126d91 (diff)
When calibrating directly update the axis structures with new min/max values.
In xserver 1.7 with axis labels, the init function used previously makes no sense anymore.
-rw-r--r--src/ws.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ws.c b/src/ws.c
index 47793af..f50cbc6 100644
--- a/src/ws.c
+++ b/src/ws.c
@@ -826,6 +826,8 @@ wsSetProperty(DeviceIntPtr device, Atom atom, XIPropertyValuePtr val,
WSDevicePtr priv = (WSDevicePtr)pInfo->private;
struct wsmouse_calibcoords coords;
int need_update = 0;
+ AxisInfoPtr ax = device->valuator->axes,
+ ay = device->valuator->axes + 1;
DBG(1, ErrorF("wsSetProperty\n"));
@@ -856,10 +858,10 @@ wsSetProperty(DeviceIntPtr device, Atom atom, XIPropertyValuePtr val,
need_update++;
}
/* Update axes descriptors */
- InitValuatorAxisStruct(device, 0,
- priv->min_x, priv->max_x, 1, 0, 1);
- InitValuatorAxisStruct(device, 1,
- priv->min_y, priv->max_y, 1, 0, 1);
+ ax->min_value = priv->min_x;
+ ax->max_value = priv->max_x;
+ ay->min_value = priv->min_y;
+ ay->max_value = priv->max_y;
}
} else if (atom == prop_swap) {
if (val->format != 8 || val->type != XA_INTEGER ||