X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/05e2b077c6187ff4d894e4af58ccd99536c9c584..b6ed2b860c3ffe62bc9556e799e129109b232487:/src/x11/app.cpp?ds=sidebyside diff --git a/src/x11/app.cpp b/src/x11/app.cpp index 4a6aca507e..ff91c2fb6b 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -173,13 +173,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv) return false; } - if ( !wxAppBase::Initialize(argc, argv) ) - { - XCloseDisplay(xdisplay); - - return false; - } - if (syncDisplay) XSynchronize(xdisplay, True); @@ -190,6 +183,13 @@ bool wxApp::Initialize(int& argc, wxChar **argv) // Misc. wxSetDetectableAutoRepeat( TRUE ); + if ( !wxAppBase::Initialize(argc, argv) ) + { + XCloseDisplay(xdisplay); + + return false; + } + #if wxUSE_UNICODE // Glib's type system required by Pango g_type_init(); @@ -672,18 +672,6 @@ bool wxApp::ProcessXEvent(WXEvent* _event) return FALSE; } -// Returns TRUE if more time is needed. -// Note that this duplicates wxEventLoopImpl::SendIdleEvent -// but ProcessIdle may be needed by apps, so is kept. -bool wxApp::ProcessIdle() -{ - wxIdleEvent event; - event.SetEventObject(this); - ProcessEvent(event); - - return event.MoreRequested(); -} - void wxApp::ExitMainLoop() { if (m_mainLoop) @@ -746,51 +734,6 @@ void wxApp::WakeUpIdle() } -// Send idle event to all top-level windows -bool wxApp::SendIdleEvents() -{ - bool needMore = FALSE; - - wxWindowList::Node* node = wxTopLevelWindows.GetFirst(); - while (node) - { - wxWindow* win = node->GetData(); - if (SendIdleEvents(win)) - needMore = TRUE; - node = node->GetNext(); - } - - return needMore; -} - -// Send idle event to window and all subwindows -bool wxApp::SendIdleEvents(wxWindow* win) -{ - bool needMore = FALSE; - - wxIdleEvent event; - event.SetEventObject(win); - - win->GetEventHandler()->ProcessEvent(event); - - if (event.MoreRequested()) - needMore = TRUE; - - wxWindowListNode* node = win->GetChildren().GetFirst(); - while (node) - { - wxWindow* win = (wxWindow*) node->GetData(); - if (SendIdleEvents(win)) - needMore = TRUE; - - node = node->GetNext(); - } - - win->OnInternalIdle(); - - return needMore; -} - // Create display, and other initialization bool wxApp::OnInitGui() {