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 | |
parent | a8a8b40fa447c85eb5d1d61ef416d3cf198c72c1 (diff) |
Update XIWarpPointer to take doubles (inputproto >= 1.9.99.902)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | include/X11/extensions/XInput2.h | 8 | ||||
-rw-r--r-- | man/XIWarpPointer.txt | 8 | ||||
-rw-r--r-- | src/XIWarpPointer.c | 16 |
4 files changed, 17 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 700b922..5459a3b 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ AC_PROG_SED XORG_CWARNFLAGS # Checks for pkg-config packages -PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.2.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 1.9.99.15]) +PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.2.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 1.9.99.902]) XI_CFLAGS="$CWARNFLAGS $XI_CFLAGS" AC_SUBST(XI_CFLAGS) AC_SUBST(XI_LIBS) diff --git a/include/X11/extensions/XInput2.h b/include/X11/extensions/XInput2.h index 60e4bb1..e6c7b30 100644 --- a/include/X11/extensions/XInput2.h +++ b/include/X11/extensions/XInput2.h @@ -314,12 +314,12 @@ extern Bool XIWarpPointer( 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 ); extern Status XIDefineCursor( diff --git a/man/XIWarpPointer.txt b/man/XIWarpPointer.txt index 7dfaffa..fcf9e69 100644 --- a/man/XIWarpPointer.txt +++ b/man/XIWarpPointer.txt @@ -15,12 +15,12 @@ SYNOPSIS int deviceid, Window src_w, Window dest_w, - int src_x, - int src_y, + double src_x, + double src_y, int src_width, int src_height, - int dest_x, - int dest_y); + double dest_x, + double dest_y); dest_w Specifies the destination window or None. 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); |