mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 06:38:37 -05:00
WM_SIZE/SIZE_MAXIMIZED can show up even during an interactive resize,
so we should ensure we treat it the same way as other WM_SIZEs that show up during that time: set the width and height in conf, and set the flag to have that width and height enacted on WM_EXITSIZEMOVE. Fixes a bug in which dragging a PuTTY window directly from the Win7 snapped-to-half-screen position to the snapped-to-maximised state would leave the terminal in the pre-snapped size. [originally from svn r9404]
This commit is contained in:
parent
f9a6c2e4a5
commit
e350ca2b4e
@ -2899,7 +2899,21 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
h = height / font_height;
|
h = height / font_height;
|
||||||
if (h < 1) h = 1;
|
if (h < 1) h = 1;
|
||||||
|
|
||||||
term_size(term, h, w, conf_get_int(conf, CONF_savelines));
|
if (resizing) {
|
||||||
|
/*
|
||||||
|
* As below, if we're in the middle of an
|
||||||
|
* interactive resize we don't call
|
||||||
|
* back->size. In Windows 7, this case can
|
||||||
|
* arise in maximisation as well via the Aero
|
||||||
|
* snap UI.
|
||||||
|
*/
|
||||||
|
need_backend_resize = TRUE;
|
||||||
|
conf_set_int(conf, CONF_height, h);
|
||||||
|
conf_set_int(conf, CONF_width, w);
|
||||||
|
} else {
|
||||||
|
term_size(term, h, w,
|
||||||
|
conf_get_int(conf, CONF_savelines));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
reset_window(0);
|
reset_window(0);
|
||||||
} else if (wParam == SIZE_RESTORED && was_zoomed) {
|
} else if (wParam == SIZE_RESTORED && was_zoomed) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user