From: Simon Tatham Date: Tue, 23 Jan 2001 17:40:51 +0000 (+0000) Subject: Roman Pompejus's suggestion: do sensible things with focus when the X-Git-Tag: r8855-g4f798d~2804 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=4cc34210ee4fd0023a044993cb91c6c15745e9b2;p=PuTTY_svn.git Roman Pompejus's suggestion: do sensible things with focus when the event log window appears or disappears. git-svn-id: http://svn.tartarus.org/sgt/putty@892 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/windlg.c b/windlg.c index 18d1abae..6b7314d4 100644 --- a/windlg.c +++ b/windlg.c @@ -56,6 +56,7 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg, case IDOK: case IDCANCEL: logbox = NULL; + SetActiveWindow(GetParent(hwnd)); DestroyWindow (hwnd); return 0; case IDN_COPY: @@ -110,6 +111,7 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg, return 0; case WM_CLOSE: logbox = NULL; + SetActiveWindow(GetParent(hwnd)); DestroyWindow (hwnd); return 0; } @@ -1991,6 +1993,7 @@ void showeventlog (HWND hwnd) { hwnd, LogProc); ShowWindow (logbox, SW_SHOWNORMAL); } + SetActiveWindow(logbox); } void showabout (HWND hwnd) {