X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/bfa7a5dba2c16d6f69772cc8db2e112670e1df5d..d200ba25fea891d749b0fefc257147c9b8cc5466:/window.c?ds=sidebyside diff --git a/window.c b/window.c index 9ea6c018..a4a376bb 100644 --- a/window.c +++ b/window.c @@ -3817,6 +3817,16 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, return -1; } +void request_paste(void) +{ + /* + * In Windows, pasting is synchronous: we can read the + * clipboard with no difficulty, so request_paste() can just go + * ahead and paste. + */ + term_do_paste(); +} + void set_title(char *title) { sfree(window_name); @@ -4202,6 +4212,22 @@ void fatalbox(char *fmt, ...) } /* + * Print a modal (Really Bad) message box and perform a fatal exit. + */ +void modalfatalbox(char *fmt, ...) +{ + va_list ap; + char stuff[200]; + + va_start(ap, fmt); + vsprintf(stuff, fmt, ap); + va_end(ap); + MessageBox(hwnd, stuff, "PuTTY Fatal Error", + MB_SYSTEMMODAL | MB_ICONERROR | MB_OK); + cleanup_exit(1); +} + +/* * Manage window caption / taskbar flashing, if enabled. * 0 = stop, 1 = maintain, 2 = start */