X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6b57b49ae3b298b63eb0df25ce4123eec6fc511e..2abb9d2f1716177aa6c0ce0fd6a2519580dc12af:/src/mac/toplevel.cpp diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index 66aadb5830..b9acd02cc0 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -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 )