From: simon Date: Fri, 22 Sep 2000 14:10:58 +0000 (+0000) Subject: Avoid rapid-fire resize events during NT opaque drags X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/ffc31afe16643bc63fcc04553ecfd0b7feeb2e83 Avoid rapid-fire resize events during NT opaque drags git-svn-id: svn://svn.tartarus.org/sgt/putty@617 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/window.c b/window.c index 9a365626..6dba5b1e 100644 --- a/window.c +++ b/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,7 +1325,13 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message, if (w != cols || h != rows || just_reconfigged) { term_invalidate(); 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; } }