Update size when going from maximised to full screen.
authorowen <owen@cda61777-01e9-0310-a592-d414129be87e>
Wed, 29 Mar 2006 17:55:40 +0000 (17:55 +0000)
committerowen <owen@cda61777-01e9-0310-a592-d414129be87e>
Wed, 29 Mar 2006 17:55:40 +0000 (17:55 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@6618 cda61777-01e9-0310-a592-d414129be87e

windows/window.c

index 1e92550..65bca73 100644 (file)
@@ -1621,8 +1621,8 @@ static void reset_window(int reinit) {
 #endif
            }
        } else {
-           if (  font_width != win_width/term->cols || 
-                 font_height != win_height/term->rows) {
+           if (  font_width * term->cols != win_width || 
+                 font_height * term->rows != win_height) {
                /* Our only choice at this point is to change the 
                 * size of the terminal; Oh well.
                 */
@@ -5163,6 +5163,10 @@ static void make_full_screen()
                        ss.bottom - ss.top,
                        SWP_FRAMECHANGED);
 
+    /* We may have changed size as a result */
+
+    reset_window(0);
+
     /* Tick the menu item in the System menu. */
     CheckMenuItem(GetSystemMenu(hwnd, FALSE), IDM_FULLSCREEN,
                  MF_CHECKED);