From ca424a99036ede64032608e073513698e4997f86 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 11 Nov 2011 18:16:19 +0100 Subject: [PATCH] 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. --- winboard/winboard.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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; -- 1.7.0.4