Fixes to sweep selection
[xboard.git] / xboard.c
index 5f4cb0c..1fbf561 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -3951,6 +3951,7 @@ void PieceMenuPopup(w, event, params, num_params)
      Cardinal *num_params;
 {
     String whichMenu; int menuNr;
+    shiftKey = strcmp(params[0], "menuW"); // used to indicate black
     if (event->type == ButtonRelease)
         menuNr = RightClick(Release, event->xbutton.x, event->xbutton.y, &pmFromX, &pmFromY);
     else if (event->type == ButtonPress)
@@ -4765,6 +4766,8 @@ void HandleUserMove(w, event, prms, nprms)
 void AnimateUserMove (Widget w, XEvent * event,
                      String * params, Cardinal * nParams)
 {
+    extern ChessSquare promoSweep;
+    if(promoSweep != EmptySquare && appData.sweepSelect) PromoScroll(event->xmotion.x, event->xmotion.y); else
     DragPieceMove(event->xmotion.x, event->xmotion.y);
 }