From: H.G. Muller Date: Fri, 11 Nov 2011 17:16:19 +0000 (+0100) Subject: Fix WinBoard clock-click bug X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=ca424a99036ede64032608e073513698e4997f86;p=xboard.git Fix WinBoard clock-click bug Clicking on the clock in WinBoard also called the LeftClick routine for handling clicks on the board. This led to the from-square being set to some inalid value, so that the next genuine board click was interpreted as a to-click, with undesired effects, especially with legality testing off or in EditPosition mode, where weird things are accepted. --- diff --git a/winboard/winboard.c b/winboard/winboard.c index 7638faf..61cda89 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -4145,9 +4145,9 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { case WM_LBUTTONDOWN: if (PtInRect((LPRECT) &whiteRect, pt)) { - ClockClick(flipClock); + ClockClick(flipClock); break; } else if (PtInRect((LPRECT) &blackRect, pt)) { - ClockClick(!flipClock); + ClockClick(!flipClock); break; } dragInfo.start.x = dragInfo.start.y = -1; dragInfo.from = dragInfo.start;