From 2e2881f4de2ec655836450a35a4ea8c134d3c6cf Mon Sep 17 00:00:00 2001 From: Lauri Nurmi Date: Fri, 10 Feb 2017 21:54:22 +0200 Subject: [PATCH] Use NS* window levels rather than kCG* The NS* names are available since OS X 10.0. --- src/osx/cocoa/nonownedwnd.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index a3c1faba5e..5557331347 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -671,7 +671,7 @@ long style, long extraStyle, const wxString& WXUNUSED(name) ) [m_macWindow setAcceptsMouseMovedEvents:YES]; - CGWindowLevel level = kCGNormalWindowLevel; + NSInteger level = NSNormalWindowLevel; if ( style & wxFRAME_TOOL_WINDOW ) { @@ -679,7 +679,7 @@ long style, long extraStyle, const wxString& WXUNUSED(name) ) } else if ( ( style & wxPOPUP_WINDOW ) ) { - level = kCGPopUpMenuWindowLevel; + level = NSPopUpMenuWindowLevel; } else if ( ( style & wxFRAME_DRAWER ) ) { @@ -890,7 +890,7 @@ void wxNonOwnedWindowCocoaImpl::SetWindowStyleFlag( long style ) // don't mess with native wrapped windows, they might throw an exception when their level is changed if (!m_wxPeer->IsNativeWindowWrapper() && m_macWindow) { - CGWindowLevel level = kCGNormalWindowLevel; + NSInteger level = NSNormalWindowLevel; if (style & wxSTAY_ON_TOP) level = NSModalPanelWindowLevel;