X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=draw.c;h=4e7b6ac67451f92a67ad06d3246a07e4f38b8335;hb=7e0222e64da6706bf0dc2468f459b98e4346206b;hp=9e966d93ef3f1f3ce1bb59089b7665f65d4d569f;hpb=1521e22cc981acc74bd7420d78c35d7e4cc87491;p=xboard.git diff --git a/draw.c b/draw.c index 9e966d9..4e7b6ac 100644 --- a/draw.c +++ b/draw.c @@ -78,7 +78,6 @@ extern char *getenv(); // [HGM] bitmaps: put before incuding the bitmaps / pixmaps, to know how many piece types there are. #include "common.h" -#include "frontend.h" #include "backend.h" #include "xevalgraph.h" #include "board.h" @@ -166,7 +165,6 @@ void InitDrawingSizes (BoardSize boardSize, int flags) { // [HGM] resize is functional now, but for board format changes only (nr of ranks, files) int boardWidth, boardHeight; - int i; static int oldWidth, oldHeight; static VariantClass oldVariant; static int oldMono = -1, oldTwoBoards = 0; @@ -773,7 +771,9 @@ DrawBlank (AnimNr anr, int x, int y, int startColor) void CopyRectangle (AnimNr anr, int srcBuf, int destBuf, int srcX, int srcY, int width, int height, int destX, int destY) { - cairo_t *cr = cairo_create (c_animBufs[anr+destBuf]); + cairo_t *cr; + c_animBufs[anr+4] = csBoardWindow; + cr = cairo_create (c_animBufs[anr+destBuf]); cairo_set_source_surface (cr, c_animBufs[anr+srcBuf], destX - srcX, destY - srcY); cairo_rectangle (cr, destX, destY, width, height); cairo_fill (cr);