X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=3a39fe0be28a32b6828426cd393dff77c0fcf2d7;hb=9c7cb89d6ae88edc97bc99e51fb6779ddf6e33b8;hp=d1d00a3231e26294326fcad3b85a239408078236;hpb=49f132baf7cc5d30a2efca71acb37f7221bd6311;p=xboard.git diff --git a/xboard.c b/xboard.c index d1d00a3..3a39fe0 100644 --- a/xboard.c +++ b/xboard.c @@ -9048,6 +9048,17 @@ DragPieceBegin(x, y) XCopyArea(xDisplay, xBoardWindow, player.saveBuf, player.blitGC, corner.x, corner.y, squareSize, squareSize, 0, 0); // [HGM] zh: unstack in stead of grab + if(gatingPiece != EmptySquare) { + /* Kludge alert: When gating we want the introduced + piece to appear on the from square. To generate an + image of it, we draw it on the board, copy the image, + and draw the original piece again. */ + ChessSquare piece = boards[currentMove][boardY][boardX]; + DrawSquare(boardY, boardX, gatingPiece, 0); + XCopyArea(xDisplay, xBoardWindow, player.saveBuf, player.blitGC, + corner.x, corner.y, squareSize, squareSize, 0, 0); + DrawSquare(boardY, boardX, piece, 0); + } damage[0][boardY][boardX] = True; } else { player.dragActive = False;