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:
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_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,6 +1325,12 @@ 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);
|
||||||
|
/*
|
||||||
|
* 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();
|
back->size();
|
||||||
just_reconfigged = FALSE;
|
just_reconfigged = FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user