]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/graphicc.cpp
cleanup
[wxWidgets.git] / src / generic / graphicc.cpp
index 2f29da4b3cf30774736237954290a97616a86a55..df232c1db3828a5b6a12f96269b90f570d85f922 100644 (file)
@@ -1036,8 +1036,13 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC&
 : wxGraphicsContext(renderer)
 {
 #ifdef __WXGTK__
+#if wxUSE_NEW_DC
+    wxGTKImplDC *impldc = (wxGTKImplDC*) dc.GetImpl();
+    Init( gdk_cairo_create( impldc->GetGDKWindow() ) );
+#else  
     Init( gdk_cairo_create( dc.m_window ) );
 #endif
+#endif
 #ifdef __WXMAC__
     int width, height;
     dc.GetSize( &width, &height );