+ case wxBG_STYLE_TRANSPARENT:
+#if wxGTK_HAS_COMPOSITING_SUPPORT
+ if (IsTransparentBackgroundSupported())
+ {
+ // Set a transparent background, so that overlaying in parent
+ // might indeed let see through where this child did not
+ // explicitly paint.
+ // NB: it works also for top level windows (but this is the
+ // windows manager which then does the compositing job)
+#ifndef __WXGTK3__
+ cr = gdk_cairo_create(m_wxwindow->window);
+ gdk_cairo_region(cr, m_nativeUpdateRegion.GetRegion());
+ cairo_clip(cr);
+#endif
+ cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
+ cairo_paint(cr);
+ cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
+#ifndef __WXGTK3__
+ cairo_surface_flush(cairo_get_target(cr));
+#endif
+ }
+#endif // wxGTK_HAS_COMPOSITING_SUPPORT
+ break;
+