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

Add protection against multiple Change Settings dialogues.

[originally from svn r5508]
This commit is contained in:
Owen Dunn 2005-03-15 20:34:08 +00:00
parent e4520ee6c7
commit 1e21ea8f63

View File

@ -108,6 +108,7 @@ static void *backhandle;
static struct unicode_data ucsdata; static struct unicode_data ucsdata;
static int session_closed; static int session_closed;
static int reconfiguring;
static const struct telnet_special *specials; static const struct telnet_special *specials;
static int n_specials; static int n_specials;
@ -1978,6 +1979,11 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
Config prev_cfg; Config prev_cfg;
int init_lvl = 1; int init_lvl = 1;
if (reconfiguring)
break;
else
reconfiguring = TRUE;
GetWindowText(hwnd, cfg.wintitle, sizeof(cfg.wintitle)); GetWindowText(hwnd, cfg.wintitle, sizeof(cfg.wintitle));
prev_cfg = cfg; prev_cfg = cfg;
@ -2114,6 +2120,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
InvalidateRect(hwnd, NULL, TRUE); InvalidateRect(hwnd, NULL, TRUE);
reset_window(init_lvl); reset_window(init_lvl);
net_pending_errors(); net_pending_errors();
reconfiguring = FALSE;
} }
break; break;
case IDM_COPYALL: case IDM_COPYALL: