Update on Mac ports.
[sgt/putty] / windows / window.c
index 1f4220e..98b3510 100644 (file)
@@ -166,8 +166,6 @@ static HPALETTE pal;
 static LPLOGPALETTE logpal;
 static RGBTRIPLE defpal[NALLCOLOURS];
 
-static HWND hwnd;
-
 static HBITMAP caretbm;
 
 static int dbltime, lasttime, lastact;
@@ -1862,7 +1860,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
            if (!cfg.warn_on_close || session_closed ||
                MessageBox(hwnd,
                           "Are you sure you want to close this session?",
-                          str, MB_ICONWARNING | MB_OKCANCEL) == IDOK)
+                          str, MB_ICONWARNING | MB_OKCANCEL | MB_DEFBUTTON2)
+               == IDOK)
                DestroyWindow(hwnd);
            sfree(str);
        }