]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
wxFont can now raelly use the native fonts
[wxWidgets.git] / src / mac / carbon / window.cpp
index 9bf4d5c69f9e42c385c3eb4758a10fb7fb849f40..29b6fc6f0f0c03b3a81fff79239de1d3e4dd36bd 100644 (file)
@@ -720,6 +720,12 @@ void wxWindowMac::MacSuperShown( bool show )
 
 void wxWindowMac::MacSuperEnabled( bool enabled ) 
 {
+    if ( !IsTopLevel() )
+    {
+      // to be absolutely correct we'd have to invalidate (with eraseBkground 
+      // because unter MacOSX the frames are drawn with an addXXX mode)
+      // the borders area
+    }
     wxNode *node = GetChildren().First();
     while ( node )
     {
@@ -1440,8 +1446,6 @@ void wxWindowMac::MacRedraw( RgnHandle updatergn , long time, bool erase)
         CopyRgn( updatergn , ownUpdateRgn ) ;
         // subtract all children from updatergn, as soon as we start with transparent windows, these should
         // not be subtracted
-        RgnHandle eraseRgn = NewRgn() ;
-        CopyRgn( ownUpdateRgn , eraseRgn ) ;
 
         RgnHandle childarea = NewRgn() ;
         for (wxNode *node = GetChildren().First(); node; node = node->Next())
@@ -1451,7 +1455,7 @@ void wxWindowMac::MacRedraw( RgnHandle updatergn , long time, bool erase)
             if ( child->MacGetRootWindow() == window && child->IsShown() )
             {
                 SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width ,  child->m_y + child->m_height ) ;
-                DiffRgn( eraseRgn , childarea , eraseRgn ) ;
+                DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;
             }
         }       
         DisposeRgn( childarea ) ;
@@ -1468,10 +1472,10 @@ void wxWindowMac::MacRedraw( RgnHandle updatergn , long time, bool erase)
         OffsetRgn( newupdate , -origin.x , -origin.y ) ;
         m_updateRegion = newupdate ;
         DisposeRgn( newupdate ) ; // it's been cloned to m_updateRegion
-        if ( erase && !EmptyRgn(eraseRgn) )
+        if ( erase && !EmptyRgn(ownUpdateRgn) )
         { 
           wxWindowDC dc(this);
-          dc.SetClippingRegion(wxRegion(eraseRgn));
+          dc.SetClippingRegion(wxRegion(ownUpdateRgn));
           wxEraseEvent eevent( GetId(), &dc );
           eevent.SetEventObject( this );
           GetEventHandler()->ProcessEvent( eevent );
@@ -1481,7 +1485,6 @@ void wxWindowMac::MacRedraw( RgnHandle updatergn , long time, bool erase)
           GetEventHandler()->ProcessEvent( eventNc );
         }
         DisposeRgn( ownUpdateRgn ) ; 
-        DisposeRgn( eraseRgn ) ;
         if ( !m_updateRegion.Empty() )
         {
           wxPaintEvent event;