X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..e1983ab58804a0e32ab2d832ded0349af1cc0476:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 0641c9878e..d17e8fc734 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -120,7 +120,7 @@ wxApp::wxApp() argc = 0; argv = NULL; - m_eventLoop = new wxEventLoop; + m_mainLoop = new wxEventLoop; m_mainColormap = (WXColormap) NULL; m_appContext = (WXAppContext) NULL; m_initialDisplay = (WXDisplay*) 0; @@ -129,7 +129,7 @@ wxApp::wxApp() wxApp::~wxApp() { - delete m_eventLoop; + delete m_mainLoop; for( wxPerDisplayDataMap::iterator it = m_perDisplayData->begin(), end = m_perDisplayData->end(); @@ -144,14 +144,6 @@ wxApp::~wxApp() wxApp::SetInstance(NULL); } -bool wxApp::Initialized() -{ - if (GetTopWindow()) - return TRUE; - else - return FALSE; -} - int wxApp::MainLoop() { /* @@ -165,36 +157,11 @@ int wxApp::MainLoop() XDefaultRootWindow(XtDisplay((Widget) wxTheApp->GetTopLevelWidget())), PropertyChangeMask); - m_eventLoop->Run(); + m_mainLoop->Run(); return 0; } -void wxApp::ExitMainLoop() -{ - if( m_eventLoop->IsRunning() ) - m_eventLoop->Exit(); -} - -// Is a message/event pending? -bool wxApp::Pending() -{ - return m_eventLoop->Pending(); -#if 0 - XFlush(XtDisplay( (Widget) wxTheApp->GetTopLevelWidget() )); - - // Fix by Doug from STI, to prevent a stall if non-X event - // is found. - return ((XtAppPending( (XtAppContext) GetAppContext() ) & XtIMXEvent) != 0) ; -#endif -} - -// Dispatch a message. -void wxApp::Dispatch() -{ - m_eventLoop->Dispatch(); -} - // This should be redefined in a derived class for // handling property change events for XAtom IPC. void wxApp::HandlePropertyChange(WXEvent *event) @@ -337,7 +304,7 @@ void wxApp::SetTopLevelWidget(WXDisplay* display, WXWidget widget) bool wxApp::Yield(bool onlyIfNeeded) { - bool s_inYield = FALSE; + static bool s_inYield = FALSE; if ( s_inYield ) {