From 748fbf95a859df3b1b9f8b95ee8cd0cc4d205a85 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 2 Jul 2001 20:52:06 +0000 Subject: [PATCH 1/1] changed Refresh to take Rect as client coordinates not window coordinates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 6 ++++-- src/mac/window.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index edc7d866a8..78d6f24710 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -930,10 +930,12 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect) // if ( !IsShown() ) // return ; - wxMacDrawingHelper focus( this ) ; + wxMacDrawingClientHelper focus( this ) ; if ( focus.Ok() ) { - Rect clientrect = { 0 , 0 , m_height , m_width } ; + wxPoint client ; + client = GetClientAreaOrigin( ) ; + Rect clientrect = { -client.y , -client.x , m_height - client.y , m_width - client.x} ; // ClipRect( &clientrect ) ; if ( rect ) diff --git a/src/mac/window.cpp b/src/mac/window.cpp index edc7d866a8..78d6f24710 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -930,10 +930,12 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect) // if ( !IsShown() ) // return ; - wxMacDrawingHelper focus( this ) ; + wxMacDrawingClientHelper focus( this ) ; if ( focus.Ok() ) { - Rect clientrect = { 0 , 0 , m_height , m_width } ; + wxPoint client ; + client = GetClientAreaOrigin( ) ; + Rect clientrect = { -client.y , -client.x , m_height - client.y , m_width - client.x} ; // ClipRect( &clientrect ) ; if ( rect ) -- 2.45.2