X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f1ae4143271ae63a17e052a1a471d16e9cd8c44..f21b2fd89d02837dfd0d195f8ff0f3f5640af017:/src/mac/carbon/dcclient.cpp?ds=sidebyside diff --git a/src/mac/carbon/dcclient.cpp b/src/mac/carbon/dcclient.cpp index 6f3a6b3517..8d97ce4889 100644 --- a/src/mac/carbon/dcclient.cpp +++ b/src/mac/carbon/dcclient.cpp @@ -16,6 +16,7 @@ #include "wx/dcclient.h" #include "wx/dcmemory.h" #include "wx/region.h" +#include "wx/window.h" #include //----------------------------------------------------------------------------- @@ -58,8 +59,8 @@ wxWindowDC::wxWindowDC(wxWindow *the_canvas) m_maxX = size.x ; m_maxY = size.y ; - MacSetupPort() ; m_ok = TRUE ; + SetBackground(wxBrush(the_canvas->GetBackgroundColour(), wxSOLID)); } wxWindowDC::~wxWindowDC() @@ -81,7 +82,6 @@ wxClientDC::wxClientDC(wxWindow *window) window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow ); m_macPort = UMAGetWindowPort( windowref ) ; - MacSetupPort() ; m_minY = m_minX = 0; wxSize size = window->GetSize() ; m_maxX = size.x ; @@ -111,15 +111,16 @@ wxPaintDC::wxPaintDC(wxWindow *window) window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow ); m_macPort = UMAGetWindowPort( windowref ) ; - MacSetupPort() ; m_ok = TRUE ; - long x , y ,w , h ; + /* + wxCoord x , y ,w , h ; window->GetUpdateRegion().GetBox( x , y , w , h ) ; m_minY = m_minX = 0; wxSize size = window->GetSize() ; m_maxX = size.x ; m_maxY = size.y ; SetClippingRegion( x , y , w , h ) ; + */ SetBackground(wxBrush(window->GetBackgroundColour(), wxSOLID)); SetFont(window->GetFont() ) ; }