Fix spurious reading of old game title by JAWS
authorH.G. Muller <h.g.muller@hccnet.nl>
Mon, 3 Jan 2011 11:50:54 +0000 (12:50 +0100)
committerArun Persaud <arun@nubati.net>
Tue, 11 Jan 2011 05:22:04 +0000 (21:22 -0800)
Because focus was switched to the board window before loading the
selected game from the game list, the titlebar still contained the
name of the previously loaded game, which would spontaneously be read by
JAWS. Now the focus switch is done after loading the new game (which
updates the window title.)

winboard/wgamelist.c

index e13bcf0..2300fda 100644 (file)
@@ -359,8 +359,8 @@ GameListDialog(HWND hDlg, UINT message,     WPARAM wParam, LPARAM lParam)
             CmailLoadGame(gameFile, nItem + 1, gameFileName, TRUE);\r
         }\r
         else {\r
             CmailLoadGame(gameFile, nItem + 1, gameFileName, TRUE);\r
         }\r
         else {\r
-           SetFocus(hwndMain); // [HGM] automatic focus switch\r
             LoadGame(gameFile, nItem + 1, gameFileName, TRUE);\r
             LoadGame(gameFile, nItem + 1, gameFileName, TRUE);\r
+           SetFocus(hwndMain); // [HGM] automatic focus switch\r
         }\r
     }\r
 \r
         }\r
     }\r
 \r