Put newly opened Chat Box on top
authorH.G. Muller <h.g.muller@hccnet.nl>
Sun, 21 Feb 2010 22:09:24 +0000 (23:09 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sun, 21 Feb 2010 22:09:24 +0000 (23:09 +0100)
Dialogs always pop up in front, so set the onTop variable that prevents
highighting the button to navigate to it from other Chat Boxes
to reflect that a newly opened Chat Box is in view.

winboard/wchat.c

index ac75819..4a1b4d3 100644 (file)
@@ -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\r
                        WM_SETTEXT, 0, (LPARAM) chatPartner[partner] );\r
        filterHasFocus[partner] = TRUE;\r
+       onTop = partner; // a newly opened box becomes top one\r
        if(chatPartner[partner][0]) {\r
            filterHasFocus[partner] = FALSE;\r
            SetFocus( GetDlgItem(hDlg, OPT_ChatInput) );\r