1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Merge resizing NACK fix from 'pre-0.78'.

This commit is contained in:
Simon Tatham 2022-09-13 12:34:02 +01:00
commit 7b119f107f

View File

@ -1659,9 +1659,11 @@ static void wintw_request_resize(TermWin *tw, int w, int h)
/* If the window is maximized suppress resizing attempts */ /* If the window is maximized suppress resizing attempts */
if (IsZoomed(wgs->term_hwnd)) { if (IsZoomed(wgs->term_hwnd)) {
if (conf_get_int(wgs->conf, CONF_resize_action) == RESIZE_TERM) if (conf_get_int(wgs->conf, CONF_resize_action) == RESIZE_TERM) {
term_resize_request_completed(wgs->term);
return; return;
} }
}
if (conf_get_int(wgs->conf, CONF_resize_action) == RESIZE_DISABLED) return; if (conf_get_int(wgs->conf, CONF_resize_action) == RESIZE_DISABLED) return;
vt = backend_vt_from_proto(be_default_protocol); vt = backend_vt_from_proto(be_default_protocol);
@ -1677,8 +1679,10 @@ static void wintw_request_resize(TermWin *tw, int w, int h)
width = (ss.right - ss.left - extra_width) / 4; width = (ss.right - ss.left - extra_width) / 4;
height = (ss.bottom - ss.top - extra_height) / 6; height = (ss.bottom - ss.top - extra_height) / 6;
if (w > width || h > height) if (w > width || h > height) {
term_resize_request_completed(wgs->term);
return; return;
}
if (w < 15) if (w < 15)
w = 15; w = 15;
if (h < 1) if (h < 1)