From dcfab363332520fedcd4e6e8c791a854ba548e83 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 26 Mar 2010 18:17:44 +0100 Subject: [PATCH] Prevent closing chat box Let it in stead switch focus back to the console window. --- winboard/wchat.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) 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) "" ); -- 1.7.0.4