+#ifdef __WXGTK3__
+static gboolean draw(GtkWidget*, cairo_t* cr, wxGLCanvas* win)
+{
+ win->m_exposed = true;
+ if (win->m_cairoPaintContext == NULL)
+ {
+ win->m_cairoPaintContext = cr;
+ cairo_reference(cr);
+ }
+ double x1, y1, x2, y2;
+ cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
+ win->GetUpdateRegion().Union(int(x1), int(y1), int(x2 - x1), int(y2 - y1));
+ return false;
+}
+#else