]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/toplevel.cpp
added wxArray::SetCount()
[wxWidgets.git] / src / mac / toplevel.cpp
index 66aadb583068f3c022a287dba0aabe1fbfb5b3cb..b9acd02cc0d5b52ea3e93eb79e9332a6b7b780f7 100644 (file)
@@ -75,7 +75,7 @@ wxTopLevelWindowMac *wxFindWinFromMacWindow(WXWindow inWindowRef)
     wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
     if (!node)
         return NULL;
-    return (wxTopLevelWindowMac *)node->Data();
+    return (wxTopLevelWindowMac *)node->GetData();
 }
 
 void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
@@ -581,7 +581,13 @@ void wxTopLevelWindowMac::MacActivate( WXEVENTREF ev , bool inIsActivating )
     
     UMAHighlightAndActivateWindow( (WindowRef)m_macWindow , inIsActivating ) ;
     
-    MacSuperEnabled( inIsActivating ) ;
+    // Early versions of MacOS X don't refresh backgrounds properly,
+    // so refresh the whole window on activation and deactivation.
+    long osVersion = UMAGetSystemVersion();
+    if (osVersion >= 0x1000 && osVersion < 0x1020)
+        Refresh(TRUE);
+    else
+        MacSuperEnabled( inIsActivating ) ;
 }
 
 void wxTopLevelWindowMac::MacKeyDown( WXEVENTREF ev )