From 5c5e66435948f93459dc4c0654e429df320488d7 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 7 Apr 2011 23:21:02 +0200 Subject: [PATCH] Make sweep-select promotions work in WinBoard The mouse-move handler had to be connected to the PromoScroll back-end routine. --- winboard/winboard.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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) -- 1.7.0.4