summaryrefslogtreecommitdiffstats
path: root/win/tkWinPointer.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-11-14 23:14:15 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-11-14 23:14:15 (GMT)
commit86fd694644ccb3cab2645c29f2eabb9cb84b9da0 (patch)
tree034322d5f2902ead1d2dc2b609fa98ff15bcfccc /win/tkWinPointer.c
parentd64da8633706ecf6d9162e794e767f6c5b15acd2 (diff)
parente312cb85dff0db0346f922c5c5ecc0c61f31fd8c (diff)
downloadtk-86fd694644ccb3cab2645c29f2eabb9cb84b9da0.zip
tk-86fd694644ccb3cab2645c29f2eabb9cb84b9da0.tar.gz
tk-86fd694644ccb3cab2645c29f2eabb9cb84b9da0.tar.bz2
merge core-8-6-branch, and add (currently failing) test bind-34.3 demonstrating that warping does not work with null or negative coordinates. Also add a bit of debug printf in TkSetCursorPos() for Windows
Diffstat (limited to 'win/tkWinPointer.c')
-rw-r--r--win/tkWinPointer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index 2b8656b..726f663 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -364,10 +364,13 @@ void TkSetCursorPos(
INPUT input;
unsigned xscreen = (GetSystemMetrics(SM_CXSCREEN) - 1);
unsigned yscreen = (GetSystemMetrics(SM_CYSCREEN) - 1);
+printf("x = %d, y = %d\n",x,y);
+printf("xscreen = %d, yscreen = %d\n",xscreen,yscreen);
input.type = INPUT_MOUSE;
input.mi.dx = (x * 65535 + xscreen/2) / xscreen;
input.mi.dy = (y * 65535 + yscreen/2) / yscreen;
+printf("input.mi.dx = %d, input.mi.dy = %d\n",input.mi.dx,input.mi.dy);
input.mi.mouseData = 0;
input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
input.mi.time = 0;