#define PUTTY_DO_GLOBALS /* actually _define_ globals */
#include "putty.h"
+#include "storage.h"
#include "win_res.h"
#define IDM_SHOWLOG 0x0010
"to continue?",
"PuTTY Warning",
MB_YESNO | MB_ICONWARNING) == IDYES) {
- random_destroy_seed();
- registry_cleanup();
+ cleanup_all();
}
exit(0);
}
return 0;
case WM_SETFOCUS:
has_focus = TRUE;
+ CreateCaret(hwnd, NULL, font_width, font_height);
term_out();
term_update();
break;
case WM_KILLFOCUS:
has_focus = FALSE;
+ DestroyCaret();
term_out();
term_update();
break;
}
/*
+ * Move the system caret. (We maintain one, even though it's
+ * invisible, for the benefit of blind people: apparently some
+ * helper software tracks the system caret, so we should arrange to
+ * have one.)
+ */
+void sys_cursor(int x, int y) {
+ SetCaretPos(x * font_width, y * font_height);
+}
+
+/*
* Draw a line of text in the window, at given character
* coordinates, in given attributes.
*