From f6e234db5b6a98d82607c098e94422d64b00f0ff Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 10 Mar 2010 18:54:28 +0100 Subject: [PATCH] Set keyboard focus at startup to board window This makes XBoard sensitive to the keybindings also when the cursor is outside the board window. This focus seems to persist indefinitely: each time the board window gets selected, the key bindings become activem wherever the mouse pointer is. Downside: the mouse pointer is no longer an arrow outside the board window, but becomes a text-insert tool there. --- xboard.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/xboard.c b/xboard.c index d049062..add80c7 100644 --- a/xboard.c +++ b/xboard.c @@ -2532,6 +2532,7 @@ XBoard square size (hint): %d\n\ } gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes() InitPosition(TRUE); + XtSetKeyboardFocus(shellWidget, formWidget); XtAppMainLoop(appContext); if (appData.debugMode) fclose(debugFP); // [DM] debug -- 1.7.0.4