diff --git a/include/wx/osx/evtloop.h b/include/wx/osx/evtloop.h index 98772dd97f..947c080fb1 100644 --- a/include/wx/osx/evtloop.h +++ b/include/wx/osx/evtloop.h @@ -31,8 +31,6 @@ public: #ifdef __WXOSX_COCOA__ // skip wxGUIEventLoop to avoid missing Enter/Exit notifications virtual int Run() { return wxCFEventLoop::Run(); } - - virtual bool ProcessIdle(); #endif protected: virtual void OSXDoRun(); diff --git a/src/osx/cocoa/evtloop.mm b/src/osx/cocoa/evtloop.mm index 442130bb34..cf9f46ed0c 100644 --- a/src/osx/cocoa/evtloop.mm +++ b/src/osx/cocoa/evtloop.mm @@ -448,45 +448,6 @@ void wxModalEventLoop::OSXDoStop() [NSApp abortModal]; } -// we need our own version of ProcessIdle here in order to -// avoid deletion of pending objects, because ProcessIdle is running -// to soon and ends up in destroying the object too early, ie before -// a stack allocated instance is removed resulting in double deletes -bool wxModalEventLoop::ProcessIdle() -{ - bool needMore = false; - if ( wxTheApp ) - { - // synthesize an idle event and check if more of them are needed - wxIdleEvent event; - event.SetEventObject(wxTheApp); - wxTheApp->ProcessEvent(event); - -#if wxUSE_LOG - // flush the logged messages if any (do this after processing the events - // which could have logged new messages) - wxLog::FlushActive(); -#endif - needMore = event.MoreRequested(); - - wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); - while (node) - { - wxWindow* win = node->GetData(); - - // Don't send idle events to the windows that are about to be destroyed - // anyhow, this is wasteful and unexpected. - if ( !wxPendingDelete.Member(win) && win->SendIdleEvents(event) ) - needMore = true; - node = node->GetNext(); - } - - wxUpdateUIEvent::ResetUpdateTime(); - - } - return needMore; -} - void wxGUIEventLoop::BeginModalSession( wxWindow* modalWindow ) { WXWindow nsnow = nil;