X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9118a24f5263c271c0b36049ba1a1b82c1763f25..b236f090ed76944de442c06ff7d13e7cf87d9a16:/src/osx/carbon/dcclient.cpp diff --git a/src/osx/carbon/dcclient.cpp b/src/osx/carbon/dcclient.cpp index 663640741c..21f3c245bd 100644 --- a/src/osx/carbon/dcclient.cpp +++ b/src/osx/carbon/dcclient.cpp @@ -68,7 +68,9 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) if ( window->MacGetLeftBorderSize() != 0 || window->MacGetTopBorderSize() != 0 ) CGContextTranslateCTM( cg , -window->MacGetLeftBorderSize() , -window->MacGetTopBorderSize() ); - SetGraphicsContext( wxGraphicsContext::CreateFromNative( cg ) ); + wxGraphicsContext* context = wxGraphicsContext::CreateFromNative( cg ); + context->EnableOffset(true); + SetGraphicsContext( context ); } DoSetClippingRegion( 0 , 0 , m_width , m_height ) ; @@ -161,6 +163,8 @@ wxClientDCImpl::wxClientDCImpl( wxDC *owner, wxWindow *window ) : wxClientDCImpl::~wxClientDCImpl() { + if( GetGraphicsContext() && GetGraphicsContext()->GetNativeContext() ) + Flush(); } /*