Check-in [c9c48cbf65]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:more tk upstream changes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c9c48cbf6515e0e898cd72e569ac3cc7e90a5af0
User & Date: chw 2019-10-11 19:18:57.569
Context
2019-10-12
06:16
add tk upstream changes check-in: 2904e9d0f1 user: chw tags: trunk
2019-10-11
19:20
merge with trunk check-in: 272fbdd6d9 user: chw tags: wtf-8-experiment
19:18
more tk upstream changes check-in: c9c48cbf65 user: chw tags: trunk
19:17
update open62541 amalgamation to version 1.0 check-in: 0ba65209b1 user: chw tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to jni/sdl2tk/win/tkWinPointer.c.
358
359
360
361
362
363
364


365
366
367
368
369
370
371
372
373
374
375
 */

void TkSetCursorPos(
    int x,
    int y)
{
    INPUT input;



    input.type = INPUT_MOUSE;
    input.mi.dx = (LONG)(x * (65535.0 / (GetSystemMetrics(SM_CXSCREEN) - 1)) + 0.5);
    input.mi.dy = (LONG)(y * (65535.0 / (GetSystemMetrics(SM_CYSCREEN) - 1)) + 0.5);
    input.mi.mouseData = 0;
    input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
    input.mi.time = 0;
    input.mi.dwExtraInfo = 0;
    SendInput(1, &input, sizeof(input));
}








>
>


|
|







358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
 */

void TkSetCursorPos(
    int x,
    int y)
{
    INPUT input;
    unsigned xscreen = (GetSystemMetrics(SM_CXSCREEN) - 1);
    unsigned yscreen = (GetSystemMetrics(SM_CYSCREEN) - 1);

    input.type = INPUT_MOUSE;
    input.mi.dx = (x * 65535 + xscreen/2) / xscreen;
    input.mi.dy = (y * 65535 + yscreen/2) / yscreen;
    input.mi.mouseData = 0;
    input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
    input.mi.time = 0;
    input.mi.dwExtraInfo = 0;
    SendInput(1, &input, sizeof(input));
}