added wxEXEC_NODISABLE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-12-19 23:59:28 +00:00
parent de9815cb4f
commit f38f689990
5 changed files with 32 additions and 12 deletions

View File

@@ -888,11 +888,17 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
return pi.dwProcessId;
}
wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
wxCHECK_MSG( traits, -1, _T("no wxAppTraits in wxExecute()?") );
wxAppTraits *traits = NULL;
void *cookie wxDUMMY_INITIALIZE(NULL);
if ( !(flags & wxEXEC_NODISABLE) )
{
if ( wxTheApp )
traits = wxTheApp->GetTraits();
wxCHECK_MSG( traits, -1, _T("no wxAppTraits in wxExecute()?") );
// disable all app windows while waiting for the child process to finish
void *cookie = traits->BeforeChildWaitLoop();
// disable all app windows while waiting for the child process to finish
cookie = traits->BeforeChildWaitLoop();
}
// wait until the child process terminates
while ( data->state )
@@ -910,7 +916,8 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
traits->AlwaysYield();
}
traits->AfterChildWaitLoop(cookie);
if ( traits )
traits->AfterChildWaitLoop(cookie);
DWORD dwExitCode = data->dwExitCode;
delete data;