X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be346c263f862da8b73f498b607d583b092c9029..2289dcea2ba6b6c1ef9dd9076fb9c632fe009f89:/src/mac/carbon/dcclient.cpp diff --git a/src/mac/carbon/dcclient.cpp b/src/mac/carbon/dcclient.cpp index 710a8f89f4..1d9ee2a5f4 100644 --- a/src/mac/carbon/dcclient.cpp +++ b/src/mac/carbon/dcclient.cpp @@ -9,16 +9,19 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dcclient.h" #endif +#include "wx/wxprec.h" + #include "wx/dcclient.h" #include "wx/dcmemory.h" #include "wx/region.h" #include "wx/window.h" #include "wx/toplevel.h" -#include +#include "wx/settings.h" +#include "wx/math.h" #include "wx/mac/private.h" //----------------------------------------------------------------------------- @@ -114,11 +117,12 @@ wxWindowDC::wxWindowDC(wxWindow *window) window->MacWindowToRootWindow( &x , &y ) ; m_macLocalOrigin.x = x ; m_macLocalOrigin.y = y ; - CopyRgn( (RgnHandle) window->MacGetVisibleRegion().GetWXHRGN() , (RgnHandle) m_macBoundaryClipRgn ) ; + CopyRgn( (RgnHandle) window->MacGetVisibleRegion(true).GetWXHRGN() , (RgnHandle) m_macBoundaryClipRgn ) ; OffsetRgn( (RgnHandle) m_macBoundaryClipRgn , m_macLocalOrigin.x , m_macLocalOrigin.y ) ; CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ; m_macPort = UMAGetWindowPort( windowref ) ; m_ok = TRUE ; + MacSetupGraphicContext() ; SetBackground(MacGetBackgroundBrush(window)); } @@ -165,6 +169,7 @@ wxClientDC::wxClientDC(wxWindow *window) m_macPort = UMAGetWindowPort( windowref ) ; m_ok = TRUE ; + MacSetupGraphicContext() ; SetBackground(MacGetBackgroundBrush(window)); SetFont( window->GetFont() ) ; } @@ -212,6 +217,7 @@ wxPaintDC::wxPaintDC(wxWindow *window) m_macPort = UMAGetWindowPort( windowref ) ; m_ok = TRUE ; + MacSetupGraphicContext() ; SetBackground(MacGetBackgroundBrush(window)); SetFont( window->GetFont() ) ; }