]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed refresh bug on early versions of MacOS X by
authorJulian Smart <julian@anthemion.co.uk>
Tue, 14 Jan 2003 21:10:32 +0000 (21:10 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 14 Jan 2003 21:10:32 +0000 (21:10 +0000)
refreshing whole window on (de)activation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toplevel.cpp
src/mac/toplevel.cpp

index 4db55381ad8d803456f266b6b1dda78752dbc4a6..b9acd02cc0d5b52ea3e93eb79e9332a6b7b780f7 100644 (file)
@@ -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 ) 
index 4db55381ad8d803456f266b6b1dda78752dbc4a6..b9acd02cc0d5b52ea3e93eb79e9332a6b7b780f7 100644 (file)
@@ -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 )