From: Julian Smart Date: Tue, 14 Jan 2003 21:10:32 +0000 (+0000) Subject: Fixed refresh bug on early versions of MacOS X by X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a006e78bd388dfb86f8b34ede2034047c062cffb Fixed refresh bug on early versions of MacOS X by refreshing whole window on (de)activation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 4db55381ad..b9acd02cc0 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -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 ) diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index 4db55381ad..b9acd02cc0 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -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 )