]> git.saurik.com Git - wxWidgets.git/commitdiff
factoring out Background setter
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 4 Jan 2006 10:34:34 +0000 (10:34 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 4 Jan 2006 10:34:34 +0000 (10:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/dcclient.cpp

index f16d43979d6e71c08b894829ed61bdead9f64344..7f14f9b53adbd3aa6b6e521a95c4fe026f82c961 100644 (file)
@@ -130,7 +130,6 @@ wxWindowDC::wxWindowDC(wxWindow *window)
         m_graphicContext = new wxMacCGContext( (CGContextRef) window->MacGetCGContextRef() ) ;
         m_graphicContext->SetPen( m_pen ) ;
         m_graphicContext->SetBrush( m_brush ) ;
-        SetBackground(MacGetBackgroundBrush(window));        
     }
     else
     {
@@ -142,7 +141,6 @@ wxWindowDC::wxWindowDC(wxWindow *window)
         m_graphicContext = new wxMacCGContext( (CGrafPtr) m_macPort ) ;
         m_graphicContext->SetPen( m_pen ) ;
         m_graphicContext->SetBrush( m_brush ) ;
-        SetBackground(MacGetBackgroundBrush(window));
     }
     // there is no out-of-order drawing on OSX
 #else
@@ -151,8 +149,8 @@ wxWindowDC::wxWindowDC(wxWindow *window)
     CopyRgn( (RgnHandle) window->MacGetVisibleRegion(true).GetWXHRGN() , (RgnHandle) m_macBoundaryClipRgn ) ;
     OffsetRgn( (RgnHandle) m_macBoundaryClipRgn , m_macLocalOrigin.x , m_macLocalOrigin.y ) ;
     CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
-    SetBackground(MacGetBackgroundBrush(window));
 #endif
+    SetBackground(MacGetBackgroundBrush(window));
 
     SetFont( window->GetFont() ) ;
 }
@@ -203,7 +201,6 @@ wxClientDC::wxClientDC(wxWindow *window)
         m_graphicContext->SetPen( m_pen ) ;
         m_graphicContext->SetBrush( m_brush ) ;
         SetClippingRegion( 0 , 0 , size.x , size.y ) ;
-        SetBackground(MacGetBackgroundBrush(window));
     }
     else
     {