X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f0ff178513f59471bfce85cf6d7a78f4f4818ab..69120ee48a66faa743b6e7c85a745806f53228ac:/src/msw/utilsexc.cpp diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 8899b5e0f1..fbeb00691f 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -531,7 +531,7 @@ static bool wxExecuteDDE(const wxString& ddeServer, long wxExecute(const wxString& cmd, int flags, wxProcess *handler) { - wxCHECK_MSG( !cmd.IsEmpty(), 0, wxT("empty command in wxExecute") ); + wxCHECK_MSG( !cmd.empty(), 0, wxT("empty command in wxExecute") ); #if wxUSE_THREADS // for many reasons, the code below breaks down if it's called from another @@ -891,8 +891,12 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler) wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; 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(); + void *cookie = NULL; + if ( !(flags & wxEXEC_NODISABLE) ) + { + // 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 +914,11 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler) traits->AlwaysYield(); } - traits->AfterChildWaitLoop(cookie); + if ( !(flags & wxEXEC_NODISABLE) ) + { + // reenable disabled windows back + traits->AfterChildWaitLoop(cookie); + } DWORD dwExitCode = data->dwExitCode; delete data;