X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=1fbf5614654c0a9c2363c2f05a33d5d760ba2ab8;hb=8a375395a4cc09b1febaf64c4b2e7ce66c59a69b;hp=9923bd29608b07d04a4d47d47c27886d238eaf44;hpb=fb1fe1e685ae5b35d0230cd33c2c0c795d6db24b;p=xboard.git diff --git a/xboard.c b/xboard.c index 9923bd2..1fbf561 100644 --- a/xboard.c +++ b/xboard.c @@ -537,6 +537,9 @@ WindowPlacement wpEngineOutput; WindowPlacement wpGameList; WindowPlacement wpTags; +extern Widget shells[]; +extern Boolean shellUp[]; + #define SOLID 0 #define OUTLINE 1 Pixmap pieceBitmap[2][(int)BlackPawn]; @@ -1533,7 +1536,7 @@ ParseCommPortSettings(char *s) } extern Widget engineOutputShell; -extern Widget tagsShell, editTagsShell; + void GetActualPlacement(Widget wg, WindowPlacement *wp) { @@ -1565,10 +1568,8 @@ GetWindowCoords() if(MoveHistoryIsUp()) GetActualPlacement(historyShell, &wpMoveHistory); if(EvalGraphIsUp()) GetActualPlacement(evalGraphShell, &wpEvalGraph); if(GameListIsUp()) GetActualPlacement(gameListShell, &wpGameList); - if(commentShell) GetActualPlacement(commentShell, &wpComment); - else GetActualPlacement(editShell, &wpComment); - if(tagsShell) GetActualPlacement(tagsShell, &wpTags); - else GetActualPlacement(editTagsShell, &wpTags); + if(shellUp[1]) GetActualPlacement(shells[1], &wpComment); + if(shellUp[2]) GetActualPlacement(shells[2], &wpTags); } void @@ -3950,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) @@ -4764,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); }