X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwchat.c;h=4a1b4d317ba6cdaa4d6e8acb883e7e51c70fb599;hb=18c9024957df2892adb21cd851cb7a27b9502d54;hp=3b90b2c3d8000dd838820a061baa466a800cf7f0;hpb=b42a7598bf84b00ff82160234839d7b1c9f3f329;p=xboard.git diff --git a/winboard/wchat.c b/winboard/wchat.c index 3b90b2c..4a1b4d3 100644 --- a/winboard/wchat.c +++ b/winboard/wchat.c @@ -207,6 +207,7 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam SendMessage( GetDlgItem(hDlg, IDC_ChatPartner), // [HGM] clickbox: initialize with requested handle WM_SETTEXT, 0, (LPARAM) chatPartner[partner] ); filterHasFocus[partner] = TRUE; + onTop = partner; // a newly opened box becomes top one if(chatPartner[partner][0]) { filterHasFocus[partner] = FALSE; SetFocus( GetDlgItem(hDlg, OPT_ChatInput) ); @@ -285,8 +286,10 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam SetDlgItemText(hDlg, OPT_ChatInput, ""); // from here on it could be back-end SaveInHistory(mess); - if(!strcmp("WHISPER", chatPartner[partner])) + if(!strcmp("whispers", chatPartner[partner])) sprintf(buf, "whisper %s\n", mess); // WHISPER box uses "whisper" to send + else if(!strcmp("shouts", chatPartner[partner])) + sprintf(buf, "shout %s\n", mess); // SHOUT box uses "shout" to send else { if(!atoi(chatPartner[partner])) { sprintf(buf, "> %s\r\n", mess); // echo only tells to handle, not channel