X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a8cd4a3a037df6caf2c8e007c77893b58cbd6018..a9249b2eb2a40d8c71f828669045c4ddaa8dc5ff:/src/mac/carbon/dcclient.cpp diff --git a/src/mac/carbon/dcclient.cpp b/src/mac/carbon/dcclient.cpp index 8d97ce4889..efb55b34c0 100644 --- a/src/mac/carbon/dcclient.cpp +++ b/src/mac/carbon/dcclient.cpp @@ -39,7 +39,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC) * wxWindowDC */ -#include +#include "wx/mac/uma.h" wxWindowDC::wxWindowDC() { @@ -48,11 +48,13 @@ wxWindowDC::wxWindowDC() wxWindowDC::wxWindowDC(wxWindow *the_canvas) { WindowRef windowref ; - wxWindow* rootwindow ; + wxWindowMac* rootwindow ; // this time it is really the full window - - the_canvas->MacGetPortParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow ); + Rect clipRect ; + the_canvas->MacGetPortParams(&m_macLocalOrigin, &clipRect , &windowref , &rootwindow ); + SetRectRgn( m_macBoundaryClipRgn , clipRect.left , clipRect.top , clipRect.right , clipRect.bottom ) ; + CopyRgn( m_macBoundaryClipRgn , m_macCurrentClipRgn ) ; m_macPort = UMAGetWindowPort( windowref ) ; m_minY = m_minX = 0; wxSize size = the_canvas->GetSize() ; @@ -78,9 +80,12 @@ wxClientDC::wxClientDC() wxClientDC::wxClientDC(wxWindow *window) { WindowRef windowref ; - wxWindow* rootwindow ; + wxWindowMac* rootwindow ; - window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow ); + Rect clipRect ; + window->MacGetPortClientParams(&m_macLocalOrigin, &clipRect , &windowref , &rootwindow ); + SetRectRgn( m_macBoundaryClipRgn , clipRect.left , clipRect.top , clipRect.right , clipRect.bottom ) ; + CopyRgn( m_macBoundaryClipRgn , m_macCurrentClipRgn ) ; m_macPort = UMAGetWindowPort( windowref ) ; m_minY = m_minX = 0; wxSize size = window->GetSize() ; @@ -106,10 +111,12 @@ wxPaintDC::wxPaintDC() wxPaintDC::wxPaintDC(wxWindow *window) { WindowRef windowref ; - wxWindow* rootwindow ; + wxWindowMac* rootwindow ; - window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow ); - + Rect clipRect ; + window->MacGetPortClientParams(&m_macLocalOrigin, &clipRect , &windowref , &rootwindow ); + CopyRgn( window->GetUpdateRegion().GetWXHRGN() , m_macBoundaryClipRgn ) ; + CopyRgn( m_macBoundaryClipRgn , m_macCurrentClipRgn ) ; m_macPort = UMAGetWindowPort( windowref ) ; m_ok = TRUE ; /*