// until idle time. This partly mimmicks defered
// sizing under MSW.
void GtkShowOnIdle() { m_showOnIdle = true; }
+
+ // This is called from the various OnInternalIdle methods
+ bool GtkShowFromOnIdle();
// fix up the mouse event coords, used by wxListBox only so far
virtual void FixUpMouseEvent(GtkWidget * WXUNUSED(widget),
void wxCheckBox::OnInternalIdle()
{
+ // Check if we have to show window now
+ if (GtkShowFromOnIdle()) return;
+
wxCursor cursor = m_cursor;
if (g_globalCursor.Ok()) cursor = g_globalCursor;
void wxListBox::OnInternalIdle()
{
- //RN: Is this needed anymore?
+ // Check if we have to show window now
+ if (GtkShowFromOnIdle()) return;
+
wxCursor cursor = m_cursor;
if (g_globalCursor.Ok()) cursor = g_globalCursor;
void wxRadioBox::OnInternalIdle()
{
+ // Check if we have to show window now
+ if (GtkShowFromOnIdle()) return;
+
if ( m_lostFocus )
{
m_hasFocus = false;
SetFocus();
}
}
+
+ if (wxUpdateUIEvent::CanUpdate(this))
+ UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
// static
void wxTextCtrl::OnInternalIdle()
{
+ // Check if we have to show window now
+ if (GtkShowFromOnIdle()) return;
+
if (g_delayedFocus == this)
{
if (GTK_WIDGET_REALIZED(m_widget))
g_delayedFocus = NULL;
}
}
-
+
if (wxUpdateUIEvent::CanUpdate(this))
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
void wxToggleBitmapButton::OnInternalIdle()
{
+ // Check if we have to show window now
+ if (GtkShowFromOnIdle()) return;
+
wxCursor cursor = m_cursor;
if (g_globalCursor.Ok())
m_resizing = false;
}
-void wxWindowGTK::OnInternalIdle()
+bool wxWindowGTK::GtkShowFromOnIdle()
{
- if ( m_dirtyTabOrder )
- {
- m_dirtyTabOrder = false;
- RealizeTabOrder();
- }
-
- // Update style if the window was not yet realized
- // and SetBackgroundStyle(wxBG_STYLE_CUSTOM) was called
- if (m_needsStyleChange)
- {
- SetBackgroundStyle(GetBackgroundStyle());
- m_needsStyleChange = false;
- }
-
if (IsShown() && m_showOnIdle && !GTK_WIDGET_VISIBLE (m_widget))
{
GtkAllocation alloc;
eventShow.SetEventObject(this);
GetEventHandler()->ProcessEvent(eventShow);
m_showOnIdle = false;
- return;
+ return true;
}
+
+ return false;
+}
+
+void wxWindowGTK::OnInternalIdle()
+{
+ // Check if we have to show window now
+ if (GtkShowFromOnIdle()) return;
+
+ if ( m_dirtyTabOrder )
+ {
+ m_dirtyTabOrder = false;
+ RealizeTabOrder();
+ }
+
+ // Update style if the window was not yet realized
+ // and SetBackgroundStyle(wxBG_STYLE_CUSTOM) was called
+ if (m_needsStyleChange)
+ {
+ SetBackgroundStyle(GetBackgroundStyle());
+ m_needsStyleChange = false;
+ }
+
// Update invalidated regions.
GtkUpdate();