diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-05 20:29:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-05 20:29:04 +0200 |
commit | a6c88e4bf1d148ac462c2bcd7061eff602b627d6 (patch) | |
tree | f26e7b89f8de36e042041934a50869d9d7ddf97c /vcl/osx/salnsmenu.mm | |
parent | af239f5affe82d0c6449e0e8f9828fe587033f02 (diff) |
SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP around new macOS 10.12 deprecations
...for now
Change-Id: I64a0a8f6a006d75b6f82d7aae570aef414984a78
Diffstat (limited to 'vcl/osx/salnsmenu.mm')
-rw-r--r-- | vcl/osx/salnsmenu.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/osx/salnsmenu.mm b/vcl/osx/salnsmenu.mm index be772f92b0cb..f777a44dba15 100644 --- a/vcl/osx/salnsmenu.mm +++ b/vcl/osx/salnsmenu.mm @@ -99,6 +99,12 @@ // must still end up in the view. This is necessary to handle common edit actions in docked // windows (e.g. in toolbar fields). NSEvent* pEvent = [NSApp currentEvent]; +SAL_WNODEPRECATED_DECLARATIONS_PUSH + // 'NSAlternateKeyMask' is deprecated: first deprecated in macOS 10.12 + // 'NSCommandKeyMask' is deprecated: first deprecated in macOS 10.12 + // 'NSControlKeyMask' is deprecated: first deprecated in macOS 10.12 + // 'NSKeyDown' is deprecated: first deprecated in macOS 10.12 + // 'NSShiftKeyMask' is deprecated: first deprecated in macOS 10.12 if( pEvent && [pEvent type] == NSKeyDown ) { unsigned int nModMask = ([pEvent modifierFlags] & (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask)); @@ -114,6 +120,7 @@ return; } } +SAL_WNODEPRECATED_DECLARATIONS_POP const AquaSalFrame* pFrame = mpMenuItem->mpParentMenu ? mpMenuItem->mpParentMenu->getFrame() : nullptr; if( pFrame && AquaSalFrame::isAlive( pFrame ) && ! pFrame->GetWindow()->IsInModalMode() ) @@ -173,7 +180,10 @@ aImgRect.origin.y = floor((aFrame.size.height - aFromRect.size.height)/2); aImgRect.size = aFromRect.size; if( rButtons[i].mpNSImage ) +SAL_WNODEPRECATED_DECLARATIONS_PUSH + // 'NSCompositeSourceOver' is deprecated: first deprecated in macOS 10.12 [rButtons[i].mpNSImage drawInRect: aImgRect fromRect: aFromRect operation: NSCompositeSourceOver fraction: 1.0]; +SAL_WNODEPRECATED_DECLARATIONS_POP aImgRect.origin.x += aFromRect.size.width + 2; } } |