]> git.saurik.com Git - wxWidgets.git/commitdiff
cleanup
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 27 Feb 2005 14:57:25 +0000 (14:57 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 27 Feb 2005 14:57:25 +0000 (14:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 3f681c83863d7dadcdecaaad4938da1a50109059..ba71652f8d2749a4db3285dc9d0a9e4561f817ec 100644 (file)
@@ -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(  ) );
 }