Merge branch 'v4.8.x'
[xboard.git] / xaw / xboard.c
index 4bca0c1..f1e991d 100644 (file)
@@ -149,6 +149,7 @@ extern char *getenv();
 #include <locale.h>
 #endif
 
+#include <X11/keysym.h>
 #include <X11/Intrinsic.h>
 #include <X11/StringDefs.h>
 #include <X11/Shell.h>
@@ -1818,7 +1819,7 @@ ModeHighlight ()
 {
     Arg args[16];
     static int oldPausing = FALSE;
-    static GameMode oldmode = (GameMode) -1;
+    static GameMode oldMode = (GameMode) -1;
     char *wname;
 
     if (!boardWidget || !XtIsRealized(boardWidget)) return;
@@ -1844,7 +1845,7 @@ ModeHighlight ()
        }
     }
 
-    wname = ModeToWidgetName(oldmode);
+    wname = ModeToWidgetName(oldMode);
     if (wname != NULL) {
        MarkMenuItem(wname, False);
     }
@@ -1852,8 +1853,9 @@ ModeHighlight ()
     if (wname != NULL) {
        MarkMenuItem(wname, True);
     }
-    oldmode = gameMode;
+    if(oldMode == TwoMachinesPlay) EnableNamedMenuItem("Mode.MachineMatch", True);
     MarkMenuItem("Mode.MachineMatch", matchMode && matchGame < appData.matchGames);
+    oldMode = gameMode;
 
     /* Maybe all the enables should be handled here, not just this one */
     EnableNamedMenuItem("Mode.Training", gameMode == Training || gameMode == PlayFromGameFile);