diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-24 15:31:55 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-24 15:32:59 +1000 |
commit | 207a7f3d5bd559ffb67de2910795d7cd6508ce09 (patch) | |
tree | 96dffdb1b7dc62cf2832c48e3aa1cf98fad9bdb7 /src | |
parent | a8a8b40fa447c85eb5d1d61ef416d3cf198c72c1 (diff) |
Update XIWarpPointer to take doubles (inputproto >= 1.9.99.902)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/XIWarpPointer.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/XIWarpPointer.c b/src/XIWarpPointer.c index 60188db..038a0d3 100644 --- a/src/XIWarpPointer.c +++ b/src/XIWarpPointer.c @@ -42,12 +42,12 @@ XIWarpPointer(Display *dpy, int deviceid, Window src_win, Window dst_win, - int src_x, - int src_y, + double src_x, + double src_y, unsigned int src_width, unsigned int src_height, - int dst_x, - int dst_y) + double dst_x, + double dst_y) { xXIWarpPointerReq *req; @@ -63,12 +63,12 @@ XIWarpPointer(Display *dpy, req->deviceid = deviceid; req->src_win = src_win; req->dst_win = dst_win; - req->src_x = src_x; - req->src_y = src_y; + req->src_x = (int)(src_x * 65536.0); + req->src_y = (int)(src_y * 65536.0); req->src_width = src_width; req->src_height = src_height; - req->dst_x = dst_x; - req->dst_y = dst_y; + req->dst_x = (int)(dst_x * 65536.0); + req->dst_y = (int)(dst_y * 65536.0); UnlockDisplay(dpy); |