+void wxTopLevelWindowMac::MacSetUnifiedAppearance( bool set )
+{
+#if TARGET_API_MAC_OSX
+ if ( UMAGetSystemVersion() >= 0x1040 )
+ {
+ if ( MacGetMetalAppearance() )
+ MacSetMetalAppearance( false ) ;
+
+ MacChangeWindowAttributes( set ? kWindowUnifiedTitleAndToolbarAttribute : kWindowNoAttributes ,
+ set ? kWindowNoAttributes : kWindowUnifiedTitleAndToolbarAttribute) ;
+
+ // For some reason, Tiger uses white as the background color for this appearance,
+ // while most apps using it use the typical striped background. Restore that behavior
+ // for wx.
+ // TODO: Determine if we need this on Leopard as well. (should be harmless either way,
+ // though)
+ SetBackgroundColour( wxSYS_COLOUR_WINDOW ) ;
+ }
+#endif
+}
+
+bool wxTopLevelWindowMac::MacGetUnifiedAppearance() const
+{
+#if TARGET_API_MAC_OSX
+ if ( UMAGetSystemVersion() >= 0x1040 )
+ return MacGetWindowAttributes() & kWindowUnifiedTitleAndToolbarAttribute ;
+ else
+#endif
+ return false;
+}
+