X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/eb04402eb853c78f51b1e434ef8f6d066e377e28..c83de30314874097728e01c7e7e94144548032b0:/window.c diff --git a/window.c b/window.c index 29828965..62e4be75 100644 --- a/window.c +++ b/window.c @@ -1,6 +1,7 @@ #include #include #include +#include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include @@ -1664,7 +1665,8 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message, * have one.) */ void sys_cursor(int x, int y) { - SetCaretPos(x * font_width, y * font_height); + if (has_focus) + SetCaretPos(x * font_width, y * font_height); } /*