From 21638402ef6d1f358bd51bcd1891f687b6bd0032 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 27 Feb 2005 14:57:25 +0000 Subject: [PATCH] cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 3f681c8386..ba71652f8d 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1275,8 +1275,6 @@ void wxWindowMac::MacRootWindowToWindow( short *x , short *y ) const void wxWindowMac::MacGetContentAreaInset( int &left , int &top , int &right , int &bottom ) { - bool isCompositing = MacGetTopLevelWindow()->MacUsesCompositing() ; - RgnHandle rgn = NewRgn() ; if ( m_peer->GetRegion( kControlContentMetaPart , rgn ) == noErr ) { @@ -1328,7 +1326,6 @@ wxSize wxWindowMac::DoGetSizeFromClientSize( const wxSize & size ) const // Get size *available for subwindows* i.e. excluding menu bar etc. void wxWindowMac::DoGetClientSize(int *x, int *y) const { - bool isCompositing = MacGetTopLevelWindow()->MacUsesCompositing() ; int ww, hh; RgnHandle rgn = NewRgn() ; @@ -1796,11 +1793,16 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags) wxPoint wxWindowMac::GetClientAreaOrigin() const { - bool isCompositing = MacGetTopLevelWindow()->MacUsesCompositing() ; RgnHandle rgn = NewRgn() ; Rect content ; - m_peer->GetRegion( kControlContentMetaPart , rgn ) ; - GetRegionBounds( rgn , &content ) ; + if ( m_peer->GetRegion( kControlContentMetaPart , rgn ) ) + { + GetRegionBounds( rgn , &content ) ; + } + else + { + content.left = content.top = 0 ; + } DisposeRgn( rgn ) ; return wxPoint( content.left + MacGetLeftBorderSize( ) , content.top + MacGetTopBorderSize( ) ); } -- 2.45.2