From ee60de21faca83fdac7c5f9ffdf1d2e06a392b65 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Wed, 30 Dec 2009 16:24:03 +0100 Subject: [PATCH] Bug 537044 - toggletoolbar attribute ignored when returning from full screen. r=josh --- widget/src/cocoa/nsCocoaWindow.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widget/src/cocoa/nsCocoaWindow.mm b/widget/src/cocoa/nsCocoaWindow.mm index 185019ee660..bc817a74d18 100644 --- a/widget/src/cocoa/nsCocoaWindow.mm +++ b/widget/src/cocoa/nsCocoaWindow.mm @@ -1763,6 +1763,7 @@ static const NSString* kStateTitleKey = @"title"; static const NSString* kStateDrawsContentsIntoWindowFrameKey = @"drawsContentsIntoWindowFrame"; static const NSString* kStateActiveTitlebarColorKey = @"activeTitlebarColor"; static const NSString* kStateInactiveTitlebarColorKey = @"inactiveTitlebarColor"; +static const NSString* kStateShowsToolbarButton = @"showsToolbarButton"; - (void)importState:(NSDictionary*)aState { @@ -1770,6 +1771,7 @@ static const NSString* kStateInactiveTitlebarColorKey = @"inactiveTitlebarColor" [self setDrawsContentsIntoWindowFrame:[[aState objectForKey:kStateDrawsContentsIntoWindowFrameKey] boolValue]]; [self setTitlebarColor:[aState objectForKey:kStateActiveTitlebarColorKey] forActiveWindow:YES]; [self setTitlebarColor:[aState objectForKey:kStateInactiveTitlebarColorKey] forActiveWindow:NO]; + [self setShowsToolbarButton:[[aState objectForKey:kStateShowsToolbarButton] boolValue]]; } - (NSMutableDictionary*)exportState @@ -1786,6 +1788,8 @@ static const NSString* kStateInactiveTitlebarColorKey = @"inactiveTitlebarColor" if (inactiveTitlebarColor) { [state setObject:inactiveTitlebarColor forKey:kStateInactiveTitlebarColorKey]; } + [state setObject:[NSNumber numberWithBool:[self showsToolbarButton]] + forKey:kStateShowsToolbarButton]; return state; }