diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index 8dcc38160c..a7ee3cc93e 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -1399,11 +1399,11 @@ int wxMacKeyCodeToModifier(wxKeyCode key) } #endif -#if wxOSX_USE_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 +#if wxOSX_USE_COCOA // defined in utils.mm -#elif wxOSX_USE_COCOA_OR_CARBON +#elif wxOSX_USE_CARBON wxMouseState wxGetMouseState() { diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index e9aaae3468..c81cf6438f 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -2222,14 +2222,8 @@ void wxMacCoreGraphicsContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDoubl if (m_composition == wxCOMPOSITION_DEST) return; - // the carbon version must be used on 10.5, or if the SDK is 10.5 -#if wxOSX_USE_CARBON || ( wxOSX_USE_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 ) -#if wxOSX_USE_COCOA -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - if ( UMAGetSystemVersion() < 0x1060 ) -#endif +#if wxOSX_USE_CARBON { -#endif // wxOSX_USE_COCOA CGContextSaveGState( m_cgContext ); CGContextTranslateCTM( m_cgContext,(CGFloat) x ,(CGFloat) (y + h) ); CGContextScaleCTM( m_cgContext, 1, -1 ); @@ -2237,15 +2231,10 @@ void wxMacCoreGraphicsContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDoubl PlotIconRefInContext( m_cgContext , &r , kAlignNone , kTransformNone , NULL , kPlotIconRefNormalFlags , icon.GetHICON() ); CGContextRestoreGState( m_cgContext ); -#if wxOSX_USE_COCOA } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - else #endif -#endif // wxOSX_USE_COCOA -#endif // wxOSX_USE_CARBON || ( wxOSX_USE_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 ) - -#if wxOSX_USE_COCOA && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + +#if wxOSX_USE_COCOA { CGRect r = CGRectMake( (CGFloat) x , (CGFloat) y , (CGFloat) w , (CGFloat) h ); const WX_NSImage nsImage = icon.GetNSImage(); diff --git a/src/osx/cocoa/menu.mm b/src/osx/cocoa/menu.mm index 1e77373e5a..562efe75d4 100644 --- a/src/osx/cocoa/menu.mm +++ b/src/osx/cocoa/menu.mm @@ -140,9 +140,6 @@ @interface NSApplication(MissingAppleMenuCall) - (void)setAppleMenu:(NSMenu *)menu; -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 -- (void)setHelpMenu:(NSMenu* )menu; -#endif @end class wxMenuCocoaImpl : public wxMenuImpl diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index b85c45c0b4..961ff524bd 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -1034,18 +1034,12 @@ bool wxNonOwnedWindowCocoaImpl::ShowFullScreen(bool show, long WXUNUSED(style)) data->m_formerLevel = [m_macWindow level]; data->m_formerFrame = [m_macWindow frame]; data->m_formerStyleMask = [m_macWindow styleMask]; -#if 0 - // CGDisplayCapture( kCGDirectMainDisplay ); - //[m_macWindow setLevel:NSMainMenuWindowLevel+1/*CGShieldingWindowLevel()*/]; -#endif + NSRect screenframe = [[NSScreen mainScreen] frame]; NSRect frame = NSMakeRect (0, 0, 100, 100); NSRect contentRect; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - if ( [ m_macWindow respondsToSelector:@selector(setStyleMask:) ] ) - [m_macWindow setStyleMask:data->m_formerStyleMask & ~ NSResizableWindowMask]; -#endif + [m_macWindow setStyleMask:data->m_formerStyleMask & ~ NSResizableWindowMask]; contentRect = [NSWindow contentRectForFrameRect: frame styleMask: [m_macWindow styleMask]]; @@ -1063,16 +1057,10 @@ bool wxNonOwnedWindowCocoaImpl::ShowFullScreen(bool show, long WXUNUSED(style)) else if ( m_macFullScreenData != NULL ) { FullScreenData *data = (FullScreenData *) m_macFullScreenData ; -#if 0 - // CGDisplayRelease( kCGDirectMainDisplay ); - // [m_macWindow setLevel:data->m_formerLevel]; -#endif [m_macWindow setFrame:data->m_formerFrame display:YES]; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - if ( [ m_macWindow respondsToSelector:@selector(setStyleMask:) ] ) - [m_macWindow setStyleMask:data->m_formerStyleMask]; -#endif + [m_macWindow setStyleMask:data->m_formerStyleMask]; + delete data ; m_macFullScreenData = NULL ;