From 25585af19461d4f52215a711cae9ddd096c535fd Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Thu, 27 Nov 2008 23:38:24 +0100 Subject: [PATCH] Bug 458297 - Form widgets and scrollbar should not be grayed when clicking on menus or dock stacks. r=smichaud, sr=roc, a191=beltzner --- widget/src/cocoa/nsNativeThemeCocoa.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/widget/src/cocoa/nsNativeThemeCocoa.mm b/widget/src/cocoa/nsNativeThemeCocoa.mm index 07f0776732e..7b779825976 100644 --- a/widget/src/cocoa/nsNativeThemeCocoa.mm +++ b/widget/src/cocoa/nsNativeThemeCocoa.mm @@ -157,7 +157,11 @@ static BOOL FrameIsInActiveWindow(nsIFrame* aFrame) // but controls in these windows should still get the active look. nsWindowType windowType; topLevelWidget->GetWindowType(windowType); - return [win isKeyWindow] || (windowType == eWindowType_popup); + if (windowType == eWindowType_popup) + return YES; + if ([win isSheet]) + return [win isKeyWindow]; + return [win isMainWindow] && ![win attachedSheet]; } NS_IMPL_ISUPPORTS1(nsNativeThemeCocoa, nsITheme)