From: H.G. Muller Date: Wed, 21 Dec 2011 21:00:26 +0000 (+0100) Subject: Fix arrow highlighting in mono-mode XB X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d83fef11e9319aace3387c825bd8e5e574cf1b22;p=xboard.git Fix arrow highlighting in mono-mode XB Draw a line around it in darkSquare color in monoMode. --- diff --git a/xboard.c b/xboard.c index 0424641..e777ea9 100644 --- a/xboard.c +++ b/xboard.c @@ -1943,7 +1943,7 @@ CreateAnyPieces() #if HAVE_LIBXPM if (appData.monoMode && // [HGM] no sense to go on to certain doom (appData.bitmapDirectory == NULL || appData.bitmapDirectory[0] == NULLCHAR)) - appData.bitmapDirectory = DEF_BITMAP_DIR; + appData.bitmapDirectory = strdup(DEF_BITMAP_DIR); if (appData.bitmapDirectory[0] != NULLCHAR) { CreatePieces(); @@ -8897,7 +8897,7 @@ void SquareToPos(int rank, int file, int *x, int *y) /* Draw an arrow between two points using current settings */ void DrawArrowBetweenPoints( int s_x, int s_y, int d_x, int d_y ) { - XPoint arrow[7]; + XPoint arrow[8]; double dx, dy, j, k, x, y; if( d_x == s_x ) { @@ -8994,6 +8994,7 @@ void DrawArrowBetweenPoints( int s_x, int s_y, int d_x, int d_y ) } XFillPolygon(xDisplay, xBoardWindow, highlineGC, arrow, 7, Nonconvex, CoordModeOrigin); + if(appData.monoMode) arrow[7] = arrow[0], XDrawLines(xDisplay, xBoardWindow, darkSquareGC, arrow, 8, CoordModeOrigin); // Polygon( hdc, arrow, 7 ); }