X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..dc259b792613550edda31cc6202b42e172e2a240:/src/mac/toplevel.cpp diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index e074c7fb31..b9acd02cc0 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -59,10 +59,6 @@ wxWindowList wxModelessWindows; static Point gs_lastWhere; static long gs_lastWhen = 0; -// cursor stuff -extern int wxBusyCursorCount; - - // ============================================================================ // wxTopLevelWindowMac implementation // ============================================================================ @@ -79,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) @@ -535,7 +531,7 @@ void wxTopLevelWindowMac::MacFireMouseEvent( WXEVENTREF evr ) if ( ev->what == mouseUp ) { wxTheApp->s_captureWindow = NULL ; - if ( wxBusyCursorCount == 0 ) + if ( !wxIsBusy() ) { m_cursor.MacInstall() ; } @@ -585,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 )