Import Tk 8.6.11

This commit is contained in:
Steve Dower
2021-03-30 00:54:10 +01:00
parent 42c69189d9
commit 070b8750b0
403 changed files with 21608 additions and 16269 deletions

View File

@@ -368,6 +368,19 @@ void TkSetCursorPos(
input.type = INPUT_MOUSE;
input.mi.dx = (x * 65535 + xscreen/2) / xscreen;
input.mi.dy = (y * 65535 + yscreen/2) / yscreen;
/*
* Horrible workaround here. There is a bug on Win 10: when warping to
* pixel (x = 0, y = 0) the SendInput() below just does not move the
* mouse pointer. However, as soon as dx or dy is non zero it moves as
* expected. Given the scaling factor of 65535 (see above),
* (dx = 1 , dy = 0) still means pixel (x = 0, y = 0).
* See ticket [69b48f427e].
*/
if (input.mi.dx == 0 && input.mi.dy == 0) {
input.mi.dx = 1;
}
input.mi.mouseData = 0;
input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
input.mi.time = 0;