summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-12-03 12:00:56 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-12-07 15:24:57 +1000
commitc294fd82eb281ec0e112431ac9c2b1463b2d95a3 (patch)
treed056fea40255ee3fbf50a392e92cda2bde9efc4b
parent37cad350ed762ae3d3e16362e22daccd643903f4 (diff)
Fix root x/y to be FP3232 on a barrier event
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--include/X11/extensions/XInput2.h4
-rw-r--r--src/XExtInt.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/X11/extensions/XInput2.h b/include/X11/extensions/XInput2.h
index 787a8d0..6f53154 100644
--- a/include/X11/extensions/XInput2.h
+++ b/include/X11/extensions/XInput2.h
@@ -343,8 +343,8 @@ typedef struct {
int sourceid;
Window window;
Window root;
- int root_x;
- int root_y;
+ double root_x;
+ double root_y;
double dx;
double dy;
double raw_dx;
diff --git a/src/XExtInt.c b/src/XExtInt.c
index b407963..03aa594 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -2011,8 +2011,8 @@ wireToBarrierEvent(xXIBarrierEvent *in, XGenericEventCookie *cookie)
out->sourceid = in->sourceid;
out->window = in->window;
out->root = in->root;
- out->root_x = in->root_x;
- out->root_y = in->root_y;
+ out->root_x = FP1616toDBL(in->root_x);
+ out->root_y = FP1616toDBL(in->root_y);
out->dx = FP3232_TO_DOUBLE (in->dx);
out->dy = FP3232_TO_DOUBLE (in->dy);
out->raw_dx = FP3232_TO_DOUBLE (in->raw_dx);