Let -sweepPromotions also work for click-click moves
[xboard.git] / xboard.c
index dae38f2..2bff8e4 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -2693,6 +2693,8 @@ XBoard square size (hint): %d\n\
     return 0;
 }
 
+static Boolean noEcho;
+
 void
 ShutDownFrontEnd()
 {
@@ -2702,6 +2704,7 @@ ShutDownFrontEnd()
     if (saveSettingsOnExit) SaveSettings(settingsFileName);
     unlink(gameCopyFilename);
     unlink(gamePasteFilename);
+    if(noEcho) EchoOn();
 }
 
 RETSIGTYPE TermSizeSigHandler(int sig)
@@ -7233,12 +7236,14 @@ void
 EchoOn()
 {
     system("stty echo");
+    noEcho = False;
 }
 
 void
 EchoOff()
 {
     system("stty -echo");
+    noEcho = True;
 }
 
 void
@@ -8639,8 +8644,8 @@ AnimateMove(board, fromX, fromY, toX, toY)
 }
 
 void
-DragPieceBegin(x, y)
-     int x; int y;
+DragPieceBegin(x, y, instantly)
+     int x; int y; Boolean instantly;
 {
     int         boardX, boardY, color;
     XPoint corner;