From: H.G. Muller Date: Thu, 8 Mar 2012 09:02:00 +0000 (+0100) Subject: Fix clearing of premove X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=80e6f9d953e34c2f2ebf745a2e23e0eb6acf882b;hp=3b4fbf5b20f6eba7e5f45e8ba87958ecfe0cbd14;p=xboard.git Fix clearing of premove Any left-clicking on the board now clears an existing premove, in addition to what it normally does. --- diff --git a/backend.c b/backend.c index 803bb71..d1f3b04 100644 --- a/backend.c +++ b/backend.c @@ -6886,6 +6886,11 @@ LeftClick (ClickType clickType, int xPix, int yPix) || x == BOARD_RGHT+1 && y >= gameInfo.holdingsSize) ) return; + if(gotPremove && clickType == Press) { // user starts something after premove has been entered: abort premove as side effect + gotPremove = 0; + ClearPremoveHighlights(); + } + if(clickType == Press && fromX == x && fromY == y && promoDefaultAltered) fromX = fromY = -1; // second click on piece after altering default promo piece treated as first click