X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwchat.c;h=48d555a122d58944d4da4fc87959c52b5f157131;hb=91d449673b904139f4bbce9e9206c161a6a9b488;hp=fbf3e15d1a803d1845817a92ccdf1846e7cb1c40;hpb=585dbd5f9edbf64775568e3f986e63969d15f912;p=xboard.git diff --git a/winboard/wchat.c b/winboard/wchat.c index fbf3e15..48d555a 100644 --- a/winboard/wchat.c +++ b/winboard/wchat.c @@ -47,7 +47,6 @@ void ChatPopUp(); void ChatPopDown(); /* Imports from backend.c */ -char * SavePart(char *str); extern int opponentKibitzes; /* Imports from winboard.c */ @@ -137,6 +136,7 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam static SnapData sd; char buf[MSG_SIZ], mess[MSG_SIZ]; int partner = -1, i; + static BOOL filterHasFocus[MAX_CHAT]; for(i=0; i is pressed while editing the filter, it's better to apply + the filter rather than selecting the current game. + */ + if( LOWORD(wParam) == IDC_ChatPartner ) { + switch( HIWORD(wParam) ) { + case EN_SETFOCUS: + filterHasFocus[partner] = TRUE; + break; + case EN_KILLFOCUS: + filterHasFocus[partner] = FALSE; + break; + } + } + + if( filterHasFocus[partner] && (LOWORD(wParam) == IDC_Send) ) { + SetFocus(GetDlgItem(hDlg, OPT_ChatInput)); + wParam = IDC_Change; + } + /* [AS] End command replacement */ + switch (LOWORD(wParam)) { case IDCANCEL: