Process pending events from wxYield() in wxGTK.

Calling wxYield() is supposed to process the pending events but it didn't, any
more, in wxGTK. Restore this by explicitly calling ProcessPendingEvents() from
wxGTK wxYield() implementation as wxGUIEventLoop::ProcessIdle() does not call
it, in spite of a comment to the contrary in the sources.

Closes #14760.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-10-23 12:02:47 +00:00
parent cf2227623a
commit 709617eec2

View File

@@ -355,6 +355,11 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
gtk_main_iteration();
gdk_event_handler_set ((GdkEventFunc)gtk_main_do_event, NULL, NULL);
// Process all pending events too, this is consistent with wxMSW behaviour
// and the behaviour of wxGTK itself in the previous versions.
if ( wxTheApp )
wxTheApp->ProcessPendingEvents();
if (eventsToProcess != wxEVT_CATEGORY_CLIPBOARD)
{
// It's necessary to call ProcessIdle() to update the frames sizes which
@@ -363,7 +368,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
// call ProcessIdle() only once since this is not meant for longish
// background jobs (controlled by wxIdleEvent::RequestMore() and the
// return value of Processidle().
ProcessIdle(); // ProcessIdle() also calls ProcessPendingEvents()
ProcessIdle();
}
//else: if we are inside ~wxClipboardSync() and we call ProcessIdle() and
// the user app contains an UI update handler which calls wxClipboard::IsSupported,