From: Stefan Csomor Date: Fri, 4 Jul 2003 19:59:34 +0000 (+0000) Subject: trying to avoid unneccessary redraws by not invalidating areas for windows that are... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c3a05e8a571f743b8213aea46ea7369126ed63b2 trying to avoid unneccessary redraws by not invalidating areas for windows that are not shown git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 9587ffa3a7..aa3e705ea1 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -886,7 +886,10 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect) if ( MacGetTopLevelWindow() == NULL ) return ; - wxPoint client = GetClientAreaOrigin(); + if ( !MacIsReallyShown() ) + return ; + + wxPoint client = GetClientAreaOrigin(); int x1 = -client.x; int y1 = -client.y; int x2 = m_width - client.x; diff --git a/src/mac/window.cpp b/src/mac/window.cpp index 9587ffa3a7..aa3e705ea1 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -886,7 +886,10 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect) if ( MacGetTopLevelWindow() == NULL ) return ; - wxPoint client = GetClientAreaOrigin(); + if ( !MacIsReallyShown() ) + return ; + + wxPoint client = GetClientAreaOrigin(); int x1 = -client.x; int y1 = -client.y; int x2 = m_width - client.x;