Fix non-default window background color with GTK+ >= 3.20

GTK+ no longer automatically paints non-default window background. See #17586
This commit is contained in:
Paul Cornett
2016-11-09 20:06:26 -08:00
parent b1a19e6b6c
commit 9bb5d0435a

View File

@@ -4352,6 +4352,15 @@ void wxWindowGTK::GTKSendPaintEvents(const GdkRegion* region)
0, 0, w, h);
#endif // !__WXGTK3__
}
#ifdef __WXGTK3__
else if (m_backgroundColour.IsOk() && gtk_check_version(3,20,0) == NULL)
{
cairo_save(cr);
gdk_cairo_set_source_rgba(cr, m_backgroundColour);
cairo_paint(cr);
cairo_restore(cr);
}
#endif
break;
case wxBG_STYLE_PAINT: