From 8ae17ed0c7ec603e3fcfef120f290a9eefe2fc3e Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 5 Oct 2012 17:56:43 +0200 Subject: [PATCH] Make dragged piece for excluding moves transparent --- xboard.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/xboard.c b/xboard.c index 8371562..84a4170 100644 --- a/xboard.c +++ b/xboard.c @@ -4104,13 +4104,15 @@ CairoOverlayPiece (ChessSquare piece, cairo_surface_t *dest) static ChessSquare oldPiece = -1; static int oldSize; static cairo_t *pieceSource; + extern int doubleClick; // in backend.c if(piece != oldPiece || squareSize != oldSize) { // try make it faster by only changing cr if we need other piece if(pieceSource) cairo_destroy (pieceSource); pieceSource = cairo_create (dest); cairo_set_source_surface (pieceSource, pngPieceBitmaps[!White(piece)][piece % BlackPawn], 0, 0); oldPiece = piece; oldSize = squareSize; } - cairo_paint(pieceSource); + if(doubleClick) cairo_paint_with_alpha (pieceSource, 0.6); + else cairo_paint(pieceSource); } void -- 1.7.0.4