aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xiquerydevice.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-26 10:58:41 +0200
committermarha <marha@users.sourceforge.net>2011-10-26 10:58:41 +0200
commit4f005bade376d15ee60e90ca45a831aff9725087 (patch)
tree5abdbe5a7c55acf9e30c533414796f629fa9e47c /xorg-server/Xi/xiquerydevice.c
parent9f986778bd4393c5a9108426969d45aa7f10f334 (diff)
downloadvcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.tar.gz
vcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.tar.bz2
vcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.zip
libX11 libXft mesa mkfontscale pixman xserver git update 26 okt 2011
Diffstat (limited to 'xorg-server/Xi/xiquerydevice.c')
-rw-r--r--xorg-server/Xi/xiquerydevice.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xorg-server/Xi/xiquerydevice.c b/xorg-server/Xi/xiquerydevice.c
index 9961d1b6f..5f543f620 100644
--- a/xorg-server/Xi/xiquerydevice.c
+++ b/xorg-server/Xi/xiquerydevice.c
@@ -41,6 +41,7 @@
#include "xserver-properties.h"
#include "exevents.h"
#include "xace.h"
+#include "inpututils.h"
#include "xiquerydevice.h"
@@ -351,8 +352,7 @@ ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber,
info->min.frac = 0;
info->max.integral = v->axes[axisnumber].max_value;
info->max.frac = 0;
- info->value.integral = (int)v->axisVal[axisnumber];
- info->value.frac = (int)(v->axisVal[axisnumber] * (1 << 16) * (1 << 16));
+ info->value = double_to_fp3232(v->axisVal[axisnumber]);
info->resolution = v->axes[axisnumber].resolution;
info->number = axisnumber;
info->mode = valuator_get_mode(dev, axisnumber);
@@ -402,8 +402,7 @@ ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo *info, int axisnumber)
ErrorF("[Xi] Unknown scroll type %d. This is a bug.\n", axis->scroll.type);
break;
}
- info->increment.integral = (int)axis->scroll.increment;
- info->increment.frac = (unsigned int)(axis->scroll.increment * (1UL << 16) * (1UL << 16));
+ info->increment = double_to_fp3232(axis->scroll.increment);
info->sourceid = v->sourceid;
info->flags = 0;