From 2dd35daad15b2509db5e1b60e8cfe76c2b994289 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 26 Feb 2004 11:01:54 +0000 Subject: [PATCH] Pending() fixed for OSX git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/app.cpp | 5 ++++- src/mac/carbon/app.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mac/app.cpp b/src/mac/app.cpp index a028b5972b..613c323b92 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -1106,7 +1106,10 @@ void wxApp::ExitMainLoop() bool wxApp::Pending() { #if TARGET_CARBON - return GetNumEventsInQueue( GetMainEventQueue() ) > 0 ; + // without the receive event (with pull param = false ) nothing is ever reported + EventRef theEvent; + ReceiveNextEvent (0, NULL, kEventDurationNoWait, false, &theEvent); + return GetNumEventsInQueue( GetMainEventQueue() ) > 0 ; #else EventRecord event ; diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index a028b5972b..613c323b92 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -1106,7 +1106,10 @@ void wxApp::ExitMainLoop() bool wxApp::Pending() { #if TARGET_CARBON - return GetNumEventsInQueue( GetMainEventQueue() ) > 0 ; + // without the receive event (with pull param = false ) nothing is ever reported + EventRef theEvent; + ReceiveNextEvent (0, NULL, kEventDurationNoWait, false, &theEvent); + return GetNumEventsInQueue( GetMainEventQueue() ) > 0 ; #else EventRecord event ; -- 2.45.2