mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
wintw_request_resize: add missing NACKs.
In cases where we refuse a resize request, either because it's too large or because the window is not currently resizable due to being maximised, we were failing to communicate that back to the Terminal so that it could stop waiting for the resize and resume processing input.
This commit is contained in:
@ -1680,8 +1680,10 @@ 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(conf, CONF_resize_action) == RESIZE_TERM)
|
if (conf_get_int(conf, CONF_resize_action) == RESIZE_TERM) {
|
||||||
|
term_resize_request_completed(term);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conf_get_int(conf, CONF_resize_action) == RESIZE_DISABLED) return;
|
if (conf_get_int(conf, CONF_resize_action) == RESIZE_DISABLED) return;
|
||||||
@ -1698,8 +1700,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(term);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (w < 15)
|
if (w < 15)
|
||||||
w = 15;
|
w = 15;
|
||||||
if (h < 1)
|
if (h < 1)
|
||||||
|
Reference in New Issue
Block a user