diff options
Diffstat (limited to 'vcl/osx/salnativewidgets.cxx')
-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", |