Dragging damages the from-square, but it is not marked as such, because
selective board redraws to update highlights and such would draw the piece
that is really still there, making it flash on the from-square before
the position after the move is drawn. This, however, backfires when the
move was illegal, as then there is no draw of a new position, and the
from-square stays empty. For now this is solved by making DisplayMoveError()
order a total redraw. (As this is rare, only done in case of an error,
and might even throw up a pop-up, the performance cost of this is acceptable.)
{
fromX = fromY = -1;
ClearHighlights();
- DrawPosition(FALSE, NULL);
+ DrawPosition(TRUE, NULL); // selective redraw would miss the from-square of the rejected move, displayed empty after drag, but not marked damaged!
if (appData.debugMode || appData.matchMode) {
fprintf(stderr, "%s: %s\n", programName, message);
}