X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxoptions.c;h=8d9141e7788678d6f77963535b3c2c1af2dac9f1;hb=df677030bcbab764120077e20f356ed244838710;hp=1f406cbeeb51f4d660741524787d50806f3b339e;hpb=27f670dbe352c1333448bb137a6aa008e4cdf3ad;p=xboard.git diff --git a/xaw/xoptions.c b/xaw/xoptions.c index 1f406cb..8d9141e 100644 --- a/xaw/xoptions.c +++ b/xaw/xoptions.c @@ -333,7 +333,7 @@ SpinCallback (Widget w, XtPointer client_data, XtPointer call_data) if(--j < opt->min) return; } else return; snprintf(buf, MSG_SIZ, "%d", j); - SetWidgetText(opt, buf, TransientDlg); + SetWidgetText(opt, buf, shellUp[TransientDlg] ? TransientDlg : MasterDlg); } static void @@ -626,7 +626,8 @@ GenericPopDown (Widget w, XEvent *event, String *prms, Cardinal *nprms) { // to cause popdown through a translation (Delete Window button!) int dlg = atoi(prms[0]); Widget sh = shells[dlg]; - if(shellUp[BrowserDlg] && dlg != BrowserDlg || dialogError) return; // prevent closing dialog when it has an open file-browse daughter + if(shellUp[BrowserDlg] && dlg != BrowserDlg || dialogError || dlg == MasterDlg && shellUp[TransientDlg]) + return; // prevent closing dialog when it has an open file-browse or transient daughter shells[dlg] = w; PopDown(dlg); shells[dlg] = sh; // restore @@ -920,6 +921,7 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent shellUp[dlgNr] = True; return 0; } + if(dlgNr == TransientDlg && parent == BoardWindow && shellUp[MasterDlg]) parent = MasterDlg; // MasterDlg can always take role of main window dialogOptions[dlgNr] = option; // make available to callback // post currentOption globally, so Spin and Combo callbacks can already use it