From: Stefan Csomor Date: Sat, 19 Feb 2005 15:34:35 +0000 (+0000) Subject: cleaning up, adding support for Quartz / Themeing before 10.3 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a8f234d2a9fcaf55a1360bc81503039c4ed766db cleaning up, adding support for Quartz / Themeing before 10.3 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/dccg.cpp b/src/mac/carbon/dccg.cpp index 255a315b60..ee8e6e608e 100755 --- a/src/mac/carbon/dccg.cpp +++ b/src/mac/carbon/dccg.cpp @@ -105,6 +105,20 @@ wxMacWindowStateSaver::~wxMacWindowStateSaver() SetThemeDrawingState( m_themeDrawingState , true ) ; } +// minimal implementation only used for appearance drawing < 10.3 + +wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) : + m_ph( (GrafPtr) dc->m_macPort ) +{ + wxASSERT( dc->Ok() ) ; + m_dc = dc ; +// dc->MacSetupPort(&m_ph) ; +} +wxMacPortSetter::~wxMacPortSetter() +{ +// m_dc->MacCleanupPort(&m_ph) ; +} + //----------------------------------------------------------------------------- // Local functions //----------------------------------------------------------------------------- @@ -1228,7 +1242,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, } wxMemoryDC* memdc = dynamic_cast(source) ; - if ( memdc ) + if ( memdc && logical_func == wxCOPY ) { wxBitmap blit = memdc->GetSelectedObject() ; wxASSERT_MSG( blit.Ok() , wxT("Invalid bitmap for blitting") ) ; @@ -1256,7 +1270,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, } else { - wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts") ) ; + return FALSE ; // wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts") ) ; } return TRUE; }