From: H.G. Muller Date: Wed, 10 Mar 2010 17:54:28 +0000 (+0100) Subject: Set keyboard focus at startup to board window X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f6e234db5b6a98d82607c098e94422d64b00f0ff;p=xboard.git 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. --- 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