X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=edf20c609fec627179cf1cbb589f12df7947202c;hb=bf1467b590e28b4dc641a3c753ce728b90d42081;hp=2102837d836bddbc26d238c0d801f5ab572ac65b;hpb=394d2d698de4f7f24853af499fdfe9a339d7a832;p=xboard.git diff --git a/xboard.c b/xboard.c index 2102837..edf20c6 100644 --- a/xboard.c +++ b/xboard.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -4224,7 +4224,7 @@ void EventProc(widget, unused, event) XDrawPosition(widget, True, NULL); break; case MotionNotify: - if(SeekGraphClick(Press, event->xbutton.x, event->xbutton.y, TRUE)) break; + if(SeekGraphClick(Press, event->xbutton.x, event->xbutton.y, 1)) break; default: return; } @@ -4321,9 +4321,17 @@ void DrawSeekText(char *buf, int x, int y) XDrawString(xDisplay, xBoardWindow, coordGC, x, y+4, buf, strlen(buf)); } -void DrawSeekDot(int x, int y, int color) +void DrawSeekDot(int x, int y, int colorNr) { - XFillArc(xDisplay, xBoardWindow, color == 0 ? prelineGC : color == 1 ? darkSquareGC : highlineGC, + int square = colorNr & 0x80; + GC color; + colorNr &= 0x7F; + color = colorNr == 0 ? prelineGC : colorNr == 1 ? darkSquareGC : highlineGC; + if(square) + XFillRectangle(xDisplay, xBoardWindow, color, + x-squareSize/9, y-squareSize/9, 2*squareSize/9, 2*squareSize/9); + else + XFillArc(xDisplay, xBoardWindow, color, x-squareSize/8, y-squareSize/8, squareSize/4, squareSize/4, 0, 64*360); }