diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-09-03 20:39:36 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-09-03 14:01:15 -0500 |
commit | 61a9838e521222e0aeb3199e18e6d828801a8035 (patch) | |
tree | fb71ac2602bd1ca92ccc612efc49511f95d8216a | |
parent | c55a21d214cc1f0c68e749ef2cf0a4b2da6af25b (diff) |
fdo#80474: Fix the check whether the window is active on OS X.
Change-Id: I68d7d11a93f5d741f2295ef183b2b607ad6833fc
Reviewed-on: https://gerrit.libreoffice.org/11266
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | vcl/osx/salnativewidgets.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 1dd622c717e9..ce3ab41b63fd 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -546,14 +546,14 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, #else if (rControlRegion.Top() == 0 && nPart == PART_DRAW_BACKGROUND_HORZ) { - BOOL isMain = [mpFrame->getNSWindow() isMainWindow]; + const bool bDrawActive = mpFrame ? ([mpFrame->getNSWindow() isKeyWindow] ? true : false) : true; CGFloat unifiedHeight = rControlRegion.GetHeight(); CGRect drawRect = CGRectMake(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight()); CUIDraw([NSWindow coreUIRenderer], drawRect, mrContext, (CFDictionaryRef)[NSDictionary dictionaryWithObjectsAndKeys: @"kCUIWidgetWindowFrame", @"widget", @"regularwin", @"windowtype", - (isMain ? @"normal" : @"inactive"), @"state", + (bDrawActive ? @"normal" : @"inactive"), @"state", [NSNumber numberWithDouble:unifiedHeight], @"kCUIWindowFrameUnifiedTitleBarHeightKey", [NSNumber numberWithBool:NO], @"kCUIWindowFrameDrawTitleSeparatorKey", [NSNumber numberWithBool:YES], @"is.flipped", |