Bug 1105939 part 3 - Save and restore window collection behavior when showing/hiding window chrome. r=mstange

--HG--
extra : source : d27f4451457a57a25bdc5e25b8ede4f9d81d6e9c
This commit is contained in:
Xidorn Quan 2015-06-04 13:49:34 +12:00
Родитель 59695c3ccb
Коммит f01f25d5ae
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -2763,6 +2763,7 @@ static const NSString* kStateDrawsContentsIntoWindowFrameKey = @"drawsContentsIn
static const NSString* kStateActiveTitlebarColorKey = @"activeTitlebarColor";
static const NSString* kStateInactiveTitlebarColorKey = @"inactiveTitlebarColor";
static const NSString* kStateShowsToolbarButton = @"showsToolbarButton";
static const NSString* kStateCollectionBehavior = @"collectionBehavior";
- (void)importState:(NSDictionary*)aState
{
@ -2771,6 +2772,7 @@ static const NSString* kStateShowsToolbarButton = @"showsToolbarButton";
[self setTitlebarColor:[aState objectForKey:kStateActiveTitlebarColorKey] forActiveWindow:YES];
[self setTitlebarColor:[aState objectForKey:kStateInactiveTitlebarColorKey] forActiveWindow:NO];
[self setShowsToolbarButton:[[aState objectForKey:kStateShowsToolbarButton] boolValue]];
[self setCollectionBehavior:[[aState objectForKey:kStateCollectionBehavior] unsignedIntValue]];
}
- (NSMutableDictionary*)exportState
@ -2789,6 +2791,8 @@ static const NSString* kStateShowsToolbarButton = @"showsToolbarButton";
}
[state setObject:[NSNumber numberWithBool:[self showsToolbarButton]]
forKey:kStateShowsToolbarButton];
[state setObject:[NSNumber numberWithUnsignedInt: [self collectionBehavior]]
forKey:kStateCollectionBehavior];
return state;
}