X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/6e67448b9a59f0a50f4fb784da3faf04d63f4994..eaf1e20af0294d79a176d2ac3b35fd4143163051:/windows/window.c diff --git a/windows/window.c b/windows/window.c index 1e925503..e997ff06 100644 --- a/windows/window.c +++ b/windows/window.c @@ -1,3 +1,8 @@ +/* + * window.c - the PuTTY(tel) main program, which runs a PuTTY terminal + * emulator and backend in a window. + */ + #include #include #include @@ -1621,8 +1626,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 +5168,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);