GLOBAL int seen_key_event;
GLOBAL int seen_disp_event;
+GLOBAL int session_closed;
+
typedef enum {
US_NONE = 0, US_KEY = 1, US_DISP = 2, US_BOTH = 3
} Unscroll_Trigger;
set_icon (msg);
}
+ session_closed = FALSE;
+
/*
* Set up the input and output buffers.
*/
case WM_CREATE:
break;
case WM_CLOSE:
- if (!cfg.warn_on_close ||
+ if (!cfg.warn_on_close || session_closed ||
MessageBox(hwnd, "Are you sure you want to close this session?",
"PuTTY Exit Confirmation",
MB_ICONWARNING | MB_OKCANCEL) == IDOK)
if (cfg.close_on_exit)
PostQuitMessage(0);
else {
+ session_closed = TRUE;
MessageBox(hwnd, "Connection closed by remote host",
"PuTTY", MB_OK | MB_ICONINFORMATION);
SetWindowText (hwnd, "PuTTY (inactive)");