]> git.saurik.com Git - wxWidgets.git/blame - src/unix/apptraits.cpp
revert nested event loop support for wxGTK1 because it causes applications hangs
[wxWidgets.git] / src / unix / apptraits.cpp
CommitLineData
eacb6b56
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: src/unix/apptraits.cpp
3// Purpose: implementation of wxGUIAppTraits for Unix systems
4// Author: Vadim Zeitlin
5// Created: 2008-03-22
eacb6b56
VZ
6// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwindows.org>
7// Licence: wxWindows licence
8///////////////////////////////////////////////////////////////////////////////
9
10// ============================================================================
11// declarations
12// ============================================================================
13
14// ----------------------------------------------------------------------------
15// headers
16// ----------------------------------------------------------------------------
17
18// for compilers that support precompilation, includes "wx.h".
19#include "wx/wxprec.h"
20
21#ifdef __BORLANDC__
22 #pragma hdrstop
23#endif
24
bddd0767
PC
25#include "wx/apptrait.h"
26
eacb6b56 27#ifndef WX_PRECOMP
bddd0767 28 #include "wx/utils.h"
eacb6b56
VZ
29#endif // WX_PRECOMP
30
eacb6b56 31#include "wx/unix/execute.h"
821d856a 32#include "wx/evtloop.h"
eacb6b56
VZ
33
34// ============================================================================
35// implementation
36// ============================================================================
37
38int wxGUIAppTraits::WaitForChild(wxExecuteData& execData)
39{
eacb6b56
VZ
40 // prepare to wait for the child termination: show to the user that we're
41 // busy and refuse all input unless explicitly told otherwise
42 wxBusyCursor bc;
821d856a 43 wxWindowDisabler wd(!(execData.flags & wxEXEC_NODISABLE));
eacb6b56 44
821d856a
VZ
45 // Allocate an event loop that will be used to wait for the process
46 // to terminate, will handle stdout, stderr, and any other events and pass
47 // it to the common (to console and GUI) code which will run it.
48 wxGUIEventLoop loop;
49 return RunLoopUntilChildExit(execData, loop);
eacb6b56
VZ
50}
51