mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Avoid rapid-fire resize events during NT opaque drags
[originally from svn r617]
This commit is contained in:
parent
196d42f89c
commit
6522c357fc
10
window.c
10
window.c
@ -944,6 +944,7 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
|
||||
static int ignore_clip = FALSE;
|
||||
static int ignore_keymenu = TRUE;
|
||||
static int just_reconfigged = FALSE;
|
||||
static int resizing = FALSE;
|
||||
|
||||
switch (message) {
|
||||
case WM_TIMER:
|
||||
@ -1250,9 +1251,12 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
|
||||
break;
|
||||
case WM_ENTERSIZEMOVE:
|
||||
EnableSizeTip(1);
|
||||
resizing = TRUE;
|
||||
break;
|
||||
case WM_EXITSIZEMOVE:
|
||||
EnableSizeTip(0);
|
||||
resizing = FALSE;
|
||||
back->size();
|
||||
break;
|
||||
case WM_SIZING:
|
||||
{
|
||||
@ -1321,6 +1325,12 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
|
||||
if (w != cols || h != rows || just_reconfigged) {
|
||||
term_invalidate();
|
||||
term_size (h, w, cfg.savelines);
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user