Put the \001 prefix back on scp error messages when they're sent to
[u/mdw/putty] / window.c
index 2982896..62e4be7 100644 (file)
--- a/window.c
+++ b/window.c
@@ -1,6 +1,7 @@
 #include <windows.h>
 #include <imm.h>
 #include <commctrl.h>
+#include <mmsystem.h>
 #ifndef AUTO_WINSOCK
 #ifdef WINSOCK_TWO
 #include <winsock2.h>
@@ -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);
 }
 
 /*