From 606838b515309b0c38facb9c57c96805ed8b2840 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 10 Jan 2015 09:13:50 +0000 Subject: [PATCH] removing overridden ProcessIdle, reverting that part of r75289 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/evtloop.h | 2 -- src/osx/cocoa/evtloop.mm | 39 --------------------------------------- 2 files changed, 41 deletions(-) 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;