]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Update size when going from maximised to full screen.
authorOwen Dunn <owen@greenend.org.uk>
Wed, 29 Mar 2006 17:55:40 +0000 (17:55 +0000)
committerOwen Dunn <owen@greenend.org.uk>
Wed, 29 Mar 2006 17:55:40 +0000 (17:55 +0000)
[originally from svn r6618]

windows/window.c

index 1e9255035e262c5cad5a3c9d79145fcf5e238b9c..65bca731324faf8e0070c4146e5f99918883a33e 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);