From: H.G. Muller Date: Fri, 26 Mar 2010 17:17:44 +0000 (+0100) Subject: Prevent closing chat box X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=dcfab363332520fedcd4e6e8c791a854ba548e83;p=xboard.git Prevent closing chat box Let it in stead switch focus back to the console window. --- diff --git a/winboard/wchat.c b/winboard/wchat.c index 64cc16a..81e190d 100644 --- a/winboard/wchat.c +++ b/winboard/wchat.c @@ -262,12 +262,9 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam switch (LOWORD(wParam)) { - case IDCANCEL: - chatHandle[partner] = 0; - chatPartner[partner][0] = 0; - ChatPopDown(); - EndDialog(hDlg, TRUE); - break; + case IDCANCEL: /* let Esc key switch focus back to console */ + SetFocus(GetDlgItem(hwndConsole, OPT_ConsoleInput)); + break; case IDC_Clear: SendMessage( GetDlgItem(hDlg, IDC_ChatMemo), WM_SETTEXT, 0, (LPARAM) "" );