Make starting new variation dependent on shift key
[xboard.git] / xboard.c
index 0f12af6..80e622e 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -1079,8 +1079,9 @@ char globalTranslations[] =
                                 \"Send to second chess program:\",,2) \n";
 
 char boardTranslations[] =
-   "<Btn1Down>: HandleUserMove() \n \
-   <Btn1Up>: HandleUserMove() \n \
+   "<Btn1Down>: HandleUserMove(0) \n \
+   Shift<Btn1Up>: HandleUserMove(1) \n \
+   <Btn1Up>: HandleUserMove(0) \n \
    <Btn1Motion>: AnimateUserMove() \n \
    <Btn3Motion>: HandlePV() \n \
    <Btn3Up>: PieceMenuPopup(menuB) \n \
@@ -4215,6 +4216,7 @@ static void colorDrawPieceImage(piece, square_color, x, y, dest)
        }
        break;
     }
+    if(appData.upsideDown && flipView) kind ^= 2; // swap white and black pieces
     XCopyArea(xDisplay, xpmPieceBitmap[kind][piece],
              dest, wlPieceGC, 0, 0,
              squareSize, squareSize, x, y);
@@ -4650,6 +4652,7 @@ void HandleUserMove(w, event, prms, nprms)
      Cardinal *nprms;
 {
     if (w != boardWidget || errorExitStatus != -1) return;
+    if(nprms) shiftKey = !strcmp(prms[0], "1");
 
     if (promotionUp) {
        if (event->type == ButtonPress) {
@@ -8119,7 +8122,8 @@ DoInputCallback(closure, source, xid)
          
          /* read from stdin */
          rl_callback_read_char(); 
-         /* redisplay the current line */
+
+         /* redisplay the current line, check special case for login and password */
          if(sending_ICS_password)
            {
              int i; char buf[MSG_SIZ];
@@ -8741,6 +8745,7 @@ OverlayPiece(piece, clip, outline,  dest)
       kind = 0;
     else
       kind = 2;
+    if(appData.upsideDown && flipView) kind ^= 2;
     XCopyArea(xDisplay, xpmPieceBitmap[kind][piece],
              dest, clip,
              0, 0, squareSize, squareSize,