vcl/osx/salnativewidgets.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 61a9838e521222e0aeb3199e18e6d828801a8035
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Wed Sep 3 20:39:36 2014 +0200

    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 <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 1dd622c..ce3ab41 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",
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to