From 9c85ff7d902909d866b59ac3d390aea310c01396 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 29 Mar 2016 16:33:30 +0200 Subject: [PATCH] Fix exposing of premove highlight and move exclusion XB Now that drawHighlights does not trigger an expose event itself, it is essiential that DrawPosition is called after every SetPremoveHighlight() call. But it wasn't after entering a premove, and after a drag-drop move exclusion the old position was not redrawn at all, leaving the dragged piece 'floating'. --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index d879de7..f736023 100644 --- a/backend.c +++ b/backend.c @@ -7168,6 +7168,7 @@ UserMoveEvent (int fromX, int fromY, int toX, int toY, int promoChar) if(ExcludeOneMove(fromY, fromX, toY, toX, promoChar, '*')) // toggle ClearPremoveHighlights(); // was included else ClearHighlights(), SetPremoveHighlights(ff, rf, ft, rt); // exclusion indicated by premove highlights + DrawPosition(FALSE, NULL); return; } @@ -7911,7 +7912,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) flashing = 1; // prevent recursive calling (by release of to-click) while flashing piece UserMoveEvent(fromX, fromY, toX, toY, promoChoice); if (!appData.highlightLastMove || gotPremove) ClearHighlights(); - if (gotPremove) SetPremoveHighlights(fromX, fromY, toX, toY); + if (gotPremove) SetPremoveHighlights(fromX, fromY, toX, toY), DrawPosition(FALSE, NULL); if(saveAnimate && !appData.animate && currentMove != oldMove && // drag-move was performed Explode(boards[currentMove-1], fromX, fromY, toX, toY)) DrawPosition(TRUE, boards[currentMove]); -- 1.7.0.4