Re-enable copying the Event Log. (rev 1.39 [r661] accidentally disabled it)
[sgt/putty] / window.c
index f5e2e23..fe9d2e9 100644 (file)
--- a/window.c
+++ b/window.c
@@ -391,7 +391,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
         char *bits;
         int size = (font_width+15)/16 * 2 * font_height; 
         bits = calloc(size, 1);
-        memset(bits, 0x55, size);
         caretbm = CreateBitmap(font_width, font_height, 1, 1, bits);
         free(bits);
     }
@@ -416,7 +415,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
      */
     {
        char *error;
-       char msg[1024];
+       char msg[1024], *title;
        char *realhost;
 
        error = back->init (hwnd, cfg.host, cfg.port, &realhost);
@@ -426,9 +425,14 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
            return 0;
        }
        window_name = icon_name = NULL;
-       sprintf(msg, "%s - PuTTY", realhost);
-       set_title (msg);
-       set_icon (msg);
+        if (*cfg.wintitle) {
+            title = cfg.wintitle;
+        } else {
+            sprintf(msg, "%s - PuTTY", realhost);
+            title = msg;
+        }
+       set_title (title);
+       set_icon (title);
     }
 
     session_closed = FALSE;