aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi')
-rw-r--r--xorg-server/Xi/exevents.c4
-rw-r--r--xorg-server/Xi/queryst.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 52a0fe3e6..8d56aa270 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -194,7 +194,7 @@ XIGetDevice(xEvent* xE)
* This code is basically the old SwitchCoreKeyboard.
*/
-static void
+void
CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
{
KeyClassPtr mk = master->key;
@@ -807,7 +807,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
{
/* XXX: Relative/Absolute mode */
v->axisVal[i] = event->valuators.data[i];
- v->axisVal[i] += event->valuators.data_frac[i];
+ v->axisVal[i] += (event->valuators.data_frac[i] * 1.0f / (1 << 16) / (1 << 16));
}
}
diff --git a/xorg-server/Xi/queryst.c b/xorg-server/Xi/queryst.c
index 60ec32ec9..2ba1edb63 100644
--- a/xorg-server/Xi/queryst.c
+++ b/xorg-server/Xi/queryst.c
@@ -147,7 +147,7 @@ ProcXQueryDeviceState(ClientPtr client)
if (v != NULL) {
tv = (xValuatorState *) buf;
tv->class = ValuatorClass;
- tv->length = sizeof(xValuatorState);
+ tv->length = sizeof(xValuatorState) + v->numAxes * 4;
tv->num_valuators = v->numAxes;
tv->mode = v->mode;
buf += sizeof(xValuatorState);