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

GTK+ no longer automatically paints non-default window background. See #17586

(cherry picked from commit 9bb5d0435a)
This commit is contained in:
Paul Cornett
2016-11-09 20:06:26 -08:00
parent 2241f97775
commit 553ec7537c

View File

@@ -4238,6 +4238,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: