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

Avoid rapid-fire resize events during NT opaque drags

[originally from svn r617]
This commit is contained in:
Simon Tatham 2000-09-22 14:10:58 +00:00
parent 196d42f89c
commit 6522c357fc

View File

@ -944,6 +944,7 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
static int ignore_clip = FALSE; static int ignore_clip = FALSE;
static int ignore_keymenu = TRUE; static int ignore_keymenu = TRUE;
static int just_reconfigged = FALSE; static int just_reconfigged = FALSE;
static int resizing = FALSE;
switch (message) { switch (message) {
case WM_TIMER: case WM_TIMER:
@ -1250,9 +1251,12 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
break; break;
case WM_ENTERSIZEMOVE: case WM_ENTERSIZEMOVE:
EnableSizeTip(1); EnableSizeTip(1);
resizing = TRUE;
break; break;
case WM_EXITSIZEMOVE: case WM_EXITSIZEMOVE:
EnableSizeTip(0); EnableSizeTip(0);
resizing = FALSE;
back->size();
break; break;
case WM_SIZING: case WM_SIZING:
{ {
@ -1321,7 +1325,13 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
if (w != cols || h != rows || just_reconfigged) { if (w != cols || h != rows || just_reconfigged) {
term_invalidate(); term_invalidate();
term_size (h, w, cfg.savelines); term_size (h, w, cfg.savelines);
back->size(); /*
* Don't call back->size in mid-resize. (To prevent
* massive numbers of resize events getting sent
* down the connection during an NT opaque drag.)
*/
if (!resizing)
back->size();
just_reconfigged = FALSE; just_reconfigged = FALSE;
} }
} }