When there were open auxiliary windows, these would have focus on
starting up XBoard. The XtSetKeyboardFocus call added in XBoard main()
was ineffective in curing that. It has now been replaced by a call to
XSetInputFocus, which does do the job. By giving input focus to the form
widget, rather than the board widget, XBoard will be immediately
sensitive to all key bindings.
}
gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes()
InitPosition(TRUE);
- XtSetKeyboardFocus(shellWidget, formWidget);
+// XtSetKeyboardFocus(shellWidget, formWidget);
+ XSetInputFocus(xDisplay, XtWindow(formWidget), RevertToPointerRoot, CurrentTime);
XtAppMainLoop(appContext);
if (appData.debugMode) fclose(debugFP); // [DM] debug