The copy-from-engine-output patch involved calling SetFocus for the
EngineOutput memos, which led to a crash if the last focus-carrying
widget was in the mean time destroyed by closing the dialog. The various
dialog-PopDown functions now invalidate the active widget.
void TimeControlPopDown()
{
if (!TimeControlUp) return;
+ previous = NULL;
XtPopdown(TimeControlShell);
XtDestroyWidget(TimeControlShell);
TimeControlUp = False;
void EnginePopDown()
{
if (!EngineUp) return;
+ previous = NULL;
XtPopdown(EngineShell);
XtDestroyWidget(EngineShell);
EngineUp = False;
void UciPopDown()
{
if (!UciUp) return;
+ previous = NULL;
XtPopdown(UciShell);
XtDestroyWidget(UciShell);
UciUp = False;
void SettingsPopDown()
{
if (!SettingsUp) return;
+ previous = NULL;
XtPopdown(SettingsShell);
XtDestroyWidget(SettingsShell);
SettingsUp = False;