summaryrefslogtreecommitdiffstats
path: root/win/tkWinPointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinPointer.c')
-rw-r--r--win/tkWinPointer.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index dcddb8f..6f1f840 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -362,6 +362,20 @@ XWarpPointer(
SetCursorPos(r.left+dest_x, r.top+dest_y);
return Success;
}
+
+void
+TkpWarpPointer(
+ TkDisplay *dispPtr)
+{
+ if (dispPtr->warpWindow) {
+ RECT r;
+
+ GetWindowRect(Tk_GetHWND(Tk_WindowId(dispPtr->warpWindow)), &r);
+ SetCursorPos(r.left + dispPtr->warpX, r.top + dispPtr->warpY);
+ } else {
+ SetCursorPos(dispPtr->warpX, dispPtr->warpY);
+ }
+}
/*
*----------------------------------------------------------------------