From: H.G. Muller Date: Wed, 21 Mar 2012 10:15:01 +0000 (+0100) Subject: Prevent double PopDowns X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=cbd80b765ec4a10f6cdde5811bc0f216c975eb50;p=xboard.git Prevent double PopDowns Some DialogOK functions ordered an early PopDown themselves. This, however, resulted in PopDown being called twice when they returned TRUE. This interfered with the new system for allowing multiple instances of the same dialog. So these functions are now fixed to suppress the standard PopDown by always returning FALSE. --- diff --git a/dialogs.c b/dialogs.c index 15fd8c5..16cf978 100644 --- a/dialogs.c +++ b/dialogs.c @@ -236,7 +236,7 @@ MatchOK (int n) if(!CreateTourney(tfName) || matchMode) return matchMode || !appData.participants[0]; PopDown(TransientDlg); // early popdown to prevent FreezeUI called through MatchEvent from causing XtGrab warning MatchEvent(2); // start tourney - return 1; + return FALSE; // no double PopDown! } static Option matchOptions[] = { @@ -1146,7 +1146,7 @@ InstallOK (int n) { PopDown(TransientDlg); // early popdown, to allow FreezeUI to instate grab if(engineChoice[0] == engineNr[0][0]) Load(&first, 0); else Load(&second, 1); - return 1; + return FALSE; // no double PopDown! } static Option installOptions[] = {