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);
ErrorPopDown ()
{
if (!errorUp) return;
- errorUp = False;
+ dialogError = errorUp = False;
XtPopdown(errorShell);
XtDestroyWidget(errorShell);
if (errorExitStatus != -1) ExitEvent(errorExitStatus);
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));
extern Widget shells[];
extern Boolean shellUp[];
+extern int dialogError;
extern Widget formWidget, shellWidget, boardWidget, menuBarWidget, gameListShell, historyShell;
extern Display *xDisplay;
extern Window xBoardWindow;
int values[MAX_OPTIONS];
ChessProgramState *currentCps;
+int dialogError;
static Option *currentOption;
static Boolean browserUp;
ButtonCallback *comboCallback;
void
GenericPopDown (Widget w, XEvent *event, String *prms, Cardinal *nprms)
{
- if(browserUp) return; // prevent closing dialog when it has an open file-browse daughter
+ if(browserUp || dialogError) return; // prevent closing dialog when it has an open file-browse daughter
PopDown(prms[0][0] - '0');
}