From 6997b6f76b0c41a4650fa468e6f160cb9e6e1fe1 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 25 Aug 2009 20:29:06 -0700 Subject: [PATCH] trigger a focus switch to ICS input field when typing old behavior was that "." or "," triggered this, now every printable character except 1-9 will trigger the focus switch --- winboard/winboard.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/winboard/winboard.c b/winboard/winboard.c index a17e4ac..d6f4a45 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -449,6 +449,8 @@ VOID EngineOutputPopDown(); BOOL EngineOutputIsUp(); VOID EngineOutputUpdate( FrontEndProgramStats * stats ); +VOID EngineOptionsPopup(); // [HGM] settings + VOID GothicPopUp(char *title, VariantClass variant); /* * Setting "frozen" should disable all user input other than deleting @@ -5094,7 +5096,7 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) ) { /* Downclick on different square. */ /* [HGM] if on holdings file, should count as new first click ! */ - { /* [HGM] now always do UserMoveTest(), and check colors there */ + /* [HGM] now always do UserMoveTest(), and check colors there */ toX = x; toY = y; /* [HGM] UserMoveEvent requires two calls now, @@ -5107,6 +5109,9 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; } else if(moveType != ImpossibleMove) { + if(moveType == IllegalMove) { + ; + } else /* [HGM] We use PromotionToKnight in Shogi to indicate frorced promotion */ if (moveType == WhitePromotionKnight || moveType == BlackPromotionKnight || ((moveType == WhitePromotionQueen || moveType == BlackPromotionQueen) && @@ -5124,7 +5129,7 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) If promotion to Q is legal, all are legal! */ if(gameInfo.variant == VariantSuper || gameInfo.variant == VariantGreat) { ChessSquare p = boards[currentMove][fromY][fromX], q = boards[currentMove][toY][toX]; - // kludge to temporarily execute move on display, wthout promotng yet + // kludge to temporarily execute move on display, without promotng yet promotionChoice = TRUE; boards[currentMove][fromY][fromX] = EmptySquare; // move Pawn to 8th rank boards[currentMove][toY][toX] = p; @@ -5649,7 +5654,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) JAWS_ALT_INTERCEPT - if (appData.icsActive && (isalpha((char)wParam) || wParam == '0')) { + if (appData.icsActive && (char)wParam > ' ' && !((char)wParam >= '1' && (char)wParam <= '9')) { // [HGM] movenum: for non-zero digits we always do type-in dialog HWND h = GetDlgItem(hwndConsole, OPT_ConsoleInput); if (IsIconic(hwndConsole)) ShowWindow(hwndConsole, SW_RESTORE); -- 1.7.0.4