From: H.G. Muller Date: Thu, 7 Apr 2011 21:21:02 +0000 (+0200) Subject: Make sweep-select promotions work in WinBoard X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5c5e66435948f93459dc4c0654e429df320488d7;p=xboard.git Make sweep-select promotions work in WinBoard The mouse-move handler had to be connected to the PromoScroll back-end routine. --- diff --git a/winboard/winboard.c b/winboard/winboard.c index 34832f0..318f33e 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -4084,6 +4084,7 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) static int recursive = 0; HMENU hmenu; BOOLEAN forceFullRepaint = IsFullRepaintPreferrable(); /* [AS] */ + extern ChessSquare promoSweep; if (recursive) { if (message == WM_MBUTTONUP) { @@ -4135,6 +4136,7 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MOUSEMOVE: if(SeekGraphClick(Press, pt.x - boardRect.left, pt.y - boardRect.top, 1)) break; + if(promoSweep != EmptySquare && appData.sweepSelect) { PromoScroll(pt.x - boardRect.left, pt.y - boardRect.top); break; } MovePV(pt.x - boardRect.left, pt.y - boardRect.top, boardRect.bottom - boardRect.top); if ((appData.animateDragging || appData.highlightDragging) && (wParam & MK_LBUTTON)