+#ifdef __WXGTK3__
+ if (!gtk_cairo_should_draw_window(cr, gtk_widget_get_window(widget)))
+ return false;
+
+ GtkStyleContext* sc = gtk_widget_get_style_context(widget);
+ gtk_style_context_save(sc);
+ gtk_style_context_add_class(sc, GTK_STYLE_CLASS_BUTTON);
+ gtk_render_frame(sc, cr, 0, 0, win->m_width, win->m_height);
+ gtk_style_context_restore(sc);
+
+ wxGTKCairoDC dc(cr);
+#else