summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-11-14 23:32:53 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-11-14 23:32:53 (GMT)
commitfa4d52dc5b517526f33d2ea80f12a405a7a24328 (patch)
treef510d4cf3237c8171361628b39bf503f6412886c /win
parent48a077dfdb3571e63dc917e03a4429b21609810c (diff)
downloadtk-fa4d52dc5b517526f33d2ea80f12a405a7a24328.zip
tk-fa4d52dc5b517526f33d2ea80f12a405a7a24328.tar.gz
tk-fa4d52dc5b517526f33d2ea80f12a405a7a24328.tar.bz2
Fix again integer arithmetics in TkSetCursorPos(), see [69b48f427e]
Diffstat (limited to 'win')
-rw-r--r--win/tkWinPointer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index 2b8656b..e7e041f 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -362,8 +362,8 @@ void TkSetCursorPos(
int y)
{
INPUT input;
- unsigned xscreen = (GetSystemMetrics(SM_CXSCREEN) - 1);
- unsigned yscreen = (GetSystemMetrics(SM_CYSCREEN) - 1);
+ int xscreen = (int)(GetSystemMetrics(SM_CXSCREEN) - 1);
+ int yscreen = (int)(GetSystemMetrics(SM_CYSCREEN) - 1);
input.type = INPUT_MOUSE;
input.mi.dx = (x * 65535 + xscreen/2) / xscreen;