diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-09-03 20:39:36 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-03 14:03:41 -0500 |
commit | f8fdcfe28859fee61c87e0a6a06f5d8eab82eed4 (patch) | |
tree | a72dc991818f3c7f10434f207fec85f64a3171a1 | |
parent | 529f584b5e2e86273c812d42ada7a489e36b9cf3 (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>
(cherry picked from commit 61a9838e521222e0aeb3199e18e6d828801a8035)
Reviewed-on: https://gerrit.libreoffice.org/11267
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.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 5aebe47b54e0..90123217c995 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -550,14 +550,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", |