Prevent GDK assertions when a window has a hidden (never shown) parent -- do not use wxRegionIterator over the parent if the parent is not mapped

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Hock
2004-12-05 19:40:01 +00:00
parent 90470763da
commit 822cf31c27
2 changed files with 38 additions and 32 deletions

View File

@@ -3867,6 +3867,8 @@ void wxWindowGTK::GtkSendPaintEvents()
if (!parent) if (!parent)
parent = (wxWindow*)this; parent = (wxWindow*)this;
if (GTK_WIDGET_MAPPED(parent->m_widget))
{
wxRegionIterator upd( m_updateRegion ); wxRegionIterator upd( m_updateRegion );
while (upd) while (upd)
{ {
@@ -3888,6 +3890,7 @@ void wxWindowGTK::GtkSendPaintEvents()
upd ++; upd ++;
} }
} }
}
else else
#ifdef __WXGTK20__ #ifdef __WXGTK20__

View File

@@ -3867,6 +3867,8 @@ void wxWindowGTK::GtkSendPaintEvents()
if (!parent) if (!parent)
parent = (wxWindow*)this; parent = (wxWindow*)this;
if (GTK_WIDGET_MAPPED(parent->m_widget))
{
wxRegionIterator upd( m_updateRegion ); wxRegionIterator upd( m_updateRegion );
while (upd) while (upd)
{ {
@@ -3888,6 +3890,7 @@ void wxWindowGTK::GtkSendPaintEvents()
upd ++; upd ++;
} }
} }
}
else else
#ifdef __WXGTK20__ #ifdef __WXGTK20__