From c3a05e8a571f743b8213aea46ea7369126ed63b2 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 4 Jul 2003 19:59:34 +0000 Subject: [PATCH] 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 --- src/mac/carbon/window.cpp | 5 ++++- src/mac/window.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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; -- 2.50.0