Kaydet (Commit) 61a9838e authored tarafından Jan Holesovsky's avatar Jan Holesovsky

fdo#80474: Fix the check whether the window is active on OS X.

Change-Id: I68d7d11a93f5d741f2295ef183b2b607ad6833fc
Reviewed-on: https://gerrit.libreoffice.org/11266Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst c55a21d2
...@@ -546,14 +546,14 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, ...@@ -546,14 +546,14 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
#else #else
if (rControlRegion.Top() == 0 && nPart == PART_DRAW_BACKGROUND_HORZ) 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(); CGFloat unifiedHeight = rControlRegion.GetHeight();
CGRect drawRect = CGRectMake(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight()); CGRect drawRect = CGRectMake(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
CUIDraw([NSWindow coreUIRenderer], drawRect, mrContext, CUIDraw([NSWindow coreUIRenderer], drawRect, mrContext,
(CFDictionaryRef)[NSDictionary dictionaryWithObjectsAndKeys: (CFDictionaryRef)[NSDictionary dictionaryWithObjectsAndKeys:
@"kCUIWidgetWindowFrame", @"widget", @"kCUIWidgetWindowFrame", @"widget",
@"regularwin", @"windowtype", @"regularwin", @"windowtype",
(isMain ? @"normal" : @"inactive"), @"state", (bDrawActive ? @"normal" : @"inactive"), @"state",
[NSNumber numberWithDouble:unifiedHeight], @"kCUIWindowFrameUnifiedTitleBarHeightKey", [NSNumber numberWithDouble:unifiedHeight], @"kCUIWindowFrameUnifiedTitleBarHeightKey",
[NSNumber numberWithBool:NO], @"kCUIWindowFrameDrawTitleSeparatorKey", [NSNumber numberWithBool:NO], @"kCUIWindowFrameDrawTitleSeparatorKey",
[NSNumber numberWithBool:YES], @"is.flipped", [NSNumber numberWithBool:YES], @"is.flipped",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment