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,25 +3867,28 @@ void wxWindowGTK::GtkSendPaintEvents()
if (!parent)
parent = (wxWindow*)this;
wxRegionIterator upd( m_updateRegion );
while (upd)
if (GTK_WIDGET_MAPPED(parent->m_widget))
{
GdkRectangle rect;
rect.x = upd.GetX();
rect.y = upd.GetY();
rect.width = upd.GetWidth();
rect.height = upd.GetHeight();
wxRegionIterator upd( m_updateRegion );
while (upd)
{
GdkRectangle rect;
rect.x = upd.GetX();
rect.y = upd.GetY();
rect.width = upd.GetWidth();
rect.height = upd.GetHeight();
gtk_paint_flat_box( parent->m_widget->style,
pizza->bin_window,
(GtkStateType)GTK_WIDGET_STATE(m_wxwindow),
GTK_SHADOW_NONE,
&rect,
parent->m_widget,
(char *)"base",
0, 0, -1, -1 );
gtk_paint_flat_box( parent->m_widget->style,
pizza->bin_window,
(GtkStateType)GTK_WIDGET_STATE(m_wxwindow),
GTK_SHADOW_NONE,
&rect,
parent->m_widget,
(char *)"base",
0, 0, -1, -1 );
upd ++;
upd ++;
}
}
}
else

View File

@ -3867,25 +3867,28 @@ void wxWindowGTK::GtkSendPaintEvents()
if (!parent)
parent = (wxWindow*)this;
wxRegionIterator upd( m_updateRegion );
while (upd)
if (GTK_WIDGET_MAPPED(parent->m_widget))
{
GdkRectangle rect;
rect.x = upd.GetX();
rect.y = upd.GetY();
rect.width = upd.GetWidth();
rect.height = upd.GetHeight();
wxRegionIterator upd( m_updateRegion );
while (upd)
{
GdkRectangle rect;
rect.x = upd.GetX();
rect.y = upd.GetY();
rect.width = upd.GetWidth();
rect.height = upd.GetHeight();
gtk_paint_flat_box( parent->m_widget->style,
pizza->bin_window,
(GtkStateType)GTK_WIDGET_STATE(m_wxwindow),
GTK_SHADOW_NONE,
&rect,
parent->m_widget,
(char *)"base",
0, 0, -1, -1 );
gtk_paint_flat_box( parent->m_widget->style,
pizza->bin_window,
(GtkStateType)GTK_WIDGET_STATE(m_wxwindow),
GTK_SHADOW_NONE,
&rect,
parent->m_widget,
(char *)"base",
0, 0, -1, -1 );
upd ++;
upd ++;
}
}
}
else