git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2072
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#endif
void DeletePendingObjects();
#endif
void DeletePendingObjects();
+ /// This can be used to suppress the generation of Idle events.
+ inline void SuppressIdleEvents(bool arg = TRUE) { m_suppressIdleEvents = arg; }
+ inline bool GetSuppressIdleEvents() const { return m_suppressIdleEvents; }
+
bool m_initialized;
bool m_exitOnFrameDelete;
bool m_wantDebugOutput;
bool m_initialized;
bool m_exitOnFrameDelete;
bool m_wantDebugOutput;
wxString m_className;
static wxAppInitializerFunction m_appInitFn;
wxString m_className;
static wxAppInitializerFunction m_appInitFn;
+ private:
+ /// Set to TRUE while we are in wxYield().
+ bool m_suppressIdleEvents;
#endif
void DeletePendingObjects();
#endif
void DeletePendingObjects();
+ /// This can be used to suppress the generation of Idle events.
+ inline void SuppressIdleEvents(bool arg = TRUE) { m_suppressIdleEvents = arg; }
+ inline bool GetSuppressIdleEvents() const { return m_suppressIdleEvents; }
+
bool m_initialized;
bool m_exitOnFrameDelete;
bool m_wantDebugOutput;
bool m_initialized;
bool m_exitOnFrameDelete;
bool m_wantDebugOutput;
wxString m_className;
static wxAppInitializerFunction m_appInitFn;
wxString m_className;
static wxAppInitializerFunction m_appInitFn;
+ private:
+ /// Set to TRUE while we are in wxYield().
+ bool m_suppressIdleEvents;
+// forward decl
+gint wxapp_idle_callback( gpointer WXUNUSED(data) );
+
bool wxYield()
{
// it's necessary to call ProcessIdle() to update the frames sizes which
bool wxYield()
{
// it's necessary to call ProcessIdle() to update the frames sizes which
- while (gtk_events_pending() > 0)
+ // We need to temporarily remove idle callbacks or the loop will
+ // never finish.
+ gtk_idle_remove( wxTheApp->m_idleTag );
+
+ while (gtk_events_pending())
+ wxTheApp->m_idleTag = gtk_idle_add( wxapp_idle_callback, (gpointer) NULL );
+// forward decl
+gint wxapp_idle_callback( gpointer WXUNUSED(data) );
+
bool wxYield()
{
// it's necessary to call ProcessIdle() to update the frames sizes which
bool wxYield()
{
// it's necessary to call ProcessIdle() to update the frames sizes which
- while (gtk_events_pending() > 0)
+ // We need to temporarily remove idle callbacks or the loop will
+ // never finish.
+ gtk_idle_remove( wxTheApp->m_idleTag );
+
+ while (gtk_events_pending())
+ wxTheApp->m_idleTag = gtk_idle_add( wxapp_idle_callback, (gpointer) NULL );