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