X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=0b3c7f4b61a7a3f0cd05a076f92ba4d2f744ff06;hb=6d2eb06e7ad56484b364a517cea83c85919f2bd8;hp=e4aec1910f5a476d04e52313193ac41e8c4865a9;hpb=2af7c68549b9aeb85ddce753062604f54f0b0b49;p=xboard.git diff --git a/xboard.c b/xboard.c index e4aec19..0b3c7f4 100644 --- a/xboard.c +++ b/xboard.c @@ -1125,7 +1125,9 @@ char boardTranslations[] = : HandleUserMove(0) \n \ : AnimateUserMove() \n \ : HandlePV() \n \ + : HandlePV() \n \ : PieceMenuPopup(menuB) \n \ + : PieceMenuPopup(menuB) \n \ Shift: XawPositionSimpleMenu(menuB) XawPositionSimpleMenu(menuD)\ PieceMenuPopup(menuB) \n \ Any: XawPositionSimpleMenu(menuW) XawPositionSimpleMenu(menuD) \ @@ -1816,6 +1818,7 @@ InitDrawingSizes (BoardSize boardSize, int flags) } } } + oldMono = -10; // kludge to force recreation of animation masks } #if HAVE_LIBXPM if(appData.monoMode != oldMono) @@ -4081,6 +4084,7 @@ CreatePieceMenus () whitePieceMenu = CreatePieceMenu("menuW", 0); blackPieceMenu = CreatePieceMenu("menuB", 1); + if(appData.pieceMenu) // [HGM] sweep: no idea what this was good for, but it stopped reporting button events outside the window XtRegisterGrabAction(PieceMenuPopup, True, (unsigned)(ButtonPressMask|ButtonReleaseMask), GrabModeAsync, GrabModeAsync); @@ -5221,7 +5225,7 @@ PromotionCallback (Widget w, XtPointer client_data, XtPointer call_data) void ErrorCallback (Widget w, XtPointer client_data, XtPointer call_data) { - errorUp = False; + dialogError = errorUp = False; XtPopdown(w = XtParent(XtParent(XtParent(w)))); XtDestroyWidget(w); if (errorExitStatus != -1) ExitEvent(errorExitStatus); @@ -5232,7 +5236,7 @@ void ErrorPopDown () { if (!errorUp) return; - errorUp = False; + dialogError = errorUp = False; XtPopdown(errorShell); XtDestroyWidget(errorShell); if (errorExitStatus != -1) ExitEvent(errorExitStatus); @@ -5255,7 +5259,7 @@ ErrorPopUp (char *title, char *label, int modal) XtSetArg(args[i], XtNtitle, title); i++; errorShell = XtCreatePopupShell("errorpopup", transientShellWidgetClass, - shellWidget, args, i); + shellUp[0] ? (dialogError = modal = TRUE, shells[0]) : shellWidget, args, i); layout = XtCreateManagedWidget(layoutName, formWidgetClass, errorShell, layoutArgs, XtNumber(layoutArgs)); @@ -5613,6 +5617,12 @@ CopyPositionProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) NULL/* transfer_done_proc */); } +void +CopyFENToClipboard () +{ // wrapper to make call from back-end possible + CopyPositionProc(NULL, NULL, NULL, NULL); +} + /* function called when the data to Paste is ready */ static void PastePositionCB (Widget w, XtPointer client_data, Atom *selection, @@ -6582,7 +6592,7 @@ AboutProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) snprintf(buf, sizeof(buf), _("%s%s\n\n" "Copyright 1991 Digital Equipment Corporation\n" -"Enhancements Copyright 1992-2009 Free Software Foundation\n" +"Enhancements Copyright 1992-2012 Free Software Foundation\n" "Enhancements Copyright 2005 Alessandro Scotti\n\n" "%s is free software and carries NO WARRANTY;" "see the file COPYING for more information."), @@ -7343,7 +7353,7 @@ StartChildProcess (char *cmdLine, char *dir, ProcRef *pr) char buf[MSG_SIZ]; if (appData.debugMode) { - fprintf(stderr, "StartChildProcess (dir=\"%s\") %s\n",dir, cmdLine); + fprintf(debugFP, "StartChildProcess (dir=\"%s\") %s\n",dir, cmdLine); } /* We do NOT feed the cmdLine to the shell; we just