From 4d057f1c54f1904fc7e01828b5896c2a979d15ea Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 27 Oct 2009 15:44:28 -0700 Subject: [PATCH] switch focus to the board after loading a game --- winboard/wgamelist.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index 2fa1533..26c843b 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -420,6 +420,7 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) CmailLoadGame(gameFile, nItem + 1, gameFileName, TRUE); } else { + SetFocus(hwndMain); // [HGM] automatic focus switch LoadGame(gameFile, nItem + 1, gameFileName, TRUE); } } @@ -446,6 +447,7 @@ VOID GameListPopUp(FILE *fp, char *filename) if (gameListDialog) { SendMessage(gameListDialog, WM_INITDIALOG, 0, 0); if (!gameListUp) ShowWindow(gameListDialog, SW_SHOW); + else SetFocus(gameListDialog); } else { lpProc = MakeProcInstance((FARPROC)GameListDialog, hInst); CreateDialog(hInst, MAKEINTRESOURCE(DLG_GameList), @@ -483,7 +485,8 @@ VOID GameListDestroy() VOID ShowGameListProc() { if (gameListUp) { - GameListPopDown(); + if(gameListDialog) SetFocus(gameListDialog); +// GameListPopDown(); } else { if (gameFileName) { GameListPopUp(gameFile, gameFileName); -- 1.7.0.4