1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-22 14:39:24 -05:00

The special treatment of Alt-resize (to cause resizing to affect the

font instead of the terminal size) should only be active in
RESIZE_EITHER mode - in RESIZE_TERM it is worse than useless.

[originally from svn r9045]
This commit is contained in:
Simon Tatham 2010-12-23 17:16:19 +00:00
parent 674f68f1ef
commit 6cd24c839d

View File

@ -2627,7 +2627,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
* 1) Keep the sizetip uptodate * 1) Keep the sizetip uptodate
* 2) Make sure the window size is _stepped_ in units of the font size. * 2) Make sure the window size is _stepped_ in units of the font size.
*/ */
if (cfg.resize_action != RESIZE_FONT && !is_alt_pressed()) { if (cfg.resize_action == RESIZE_TERM ||
(cfg.resize_action == RESIZE_EITHER && !is_alt_pressed())) {
int width, height, w, h, ew, eh; int width, height, w, h, ew, eh;
LPRECT r = (LPRECT) lParam; LPRECT r = (LPRECT) lParam;
@ -2778,7 +2779,9 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
reset_window(0); reset_window(0);
} else if (wParam == SIZE_MINIMIZED) { } else if (wParam == SIZE_MINIMIZED) {
/* do nothing */ /* do nothing */
} else if (cfg.resize_action != RESIZE_FONT && !is_alt_pressed()) { } else if (cfg.resize_action == RESIZE_TERM ||
(cfg.resize_action == RESIZE_EITHER &&
!is_alt_pressed())) {
w = (width-cfg.window_border*2) / font_width; w = (width-cfg.window_border*2) / font_width;
if (w < 1) w = 1; if (w < 1) w = 1;
h = (height-cfg.window_border*2) / font_height; h = (height-cfg.window_border*2) / font_height;