projects
/
u
/
mdw
/
putty
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
676c055
)
Prompt before summarily closing a session
author
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 4 Nov 1999 13:44:21 +0000
(13:44 +0000)
committer
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 4 Nov 1999 13:44:21 +0000
(13:44 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@272
cda61777
-01e9-0310-a592-
d414129be87e
window.c
patch
|
blob
|
blame
|
history
diff --git
a/window.c
b/window.c
index
8c82af9
..
10650ed
100644
(file)
--- a/
window.c
+++ b/
window.c
@@
-616,6
+616,12
@@
static int WINAPI WndProc (HWND hwnd, UINT message,
switch (message) {
case WM_CREATE:
break;
+ case WM_CLOSE:
+ if (MessageBox(hwnd, "Are you sure you want to close this session?",
+ "PuTTY Exit Confirmation",
+ MB_ICONWARNING | MB_OKCANCEL) == IDOK)
+ DestroyWindow(hwnd);
+ return 0;
case WM_DESTROY:
PostQuitMessage (0);
return 0;
@@
-1248,7
+1254,7
@@
static int TranslateKey(WPARAM wParam, LPARAM lParam, unsigned char *output) {
return 0;
}
if ((lParam & 0x20000000) && wParam == VK_F4) {
- SendMessage (hwnd, WM_
DESTROY
, 0, 0);
+ SendMessage (hwnd, WM_
CLOSE
, 0, 0);
return 0;
}