Enable explicit changing of the window title after session start
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 8 Jan 2001 16:28:21 +0000 (16:28 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 8 Jan 2001 16:28:21 +0000 (16:28 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@852 cda61777-01e9-0310-a592-d414129be87e

windlg.c
window.c

index b916585..36cbf5c 100644 (file)
--- a/windlg.c
+++ b/windlg.c
@@ -844,10 +844,9 @@ static int GenericMainDlgProc (HWND hwnd, UINT msg,
             endbox(&cp);
             beginbox(&cp, "Adjust the use of the window title",
                      IDC_BOX_APPEARANCE3, IDC_BOXT_APPEARANCE3);
-           if (dlgtype == 0)
-               multiedit(&cp,
-                         "Initial window &title:", IDC_WINTITLE,
-                         IDC_WINEDIT, 100, NULL);
+            multiedit(&cp,
+                      "Window &title:", IDC_WINTITLE,
+                      IDC_WINEDIT, 100, NULL);
            checkbox(&cp, "Avoid ever using &icon title", IDC_WINNAME);
             endbox(&cp);
 
index 99b374d..a9456c8 100644 (file)
--- a/window.c
+++ b/window.c
@@ -1183,6 +1183,7 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
                cfg.height = rows;
                old_fwidth = font_width;
                old_fheight = font_height;
+                GetWindowText(hwnd, cfg.wintitle, sizeof(cfg.wintitle));
 
                 if (!do_reconfig(hwnd))
                     break;
@@ -1282,6 +1283,7 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
                                  SWP_NOACTIVATE | SWP_NOCOPYBITS |
                                  SWP_NOMOVE | SWP_NOZORDER);
                }
+                set_title(cfg.wintitle);
                 if (IsIconic(hwnd)) {
                     SetWindowText (hwnd,
                                    cfg.win_name_always ? window_name : icon_name);