Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions INAppStoreWindow/INAppStoreWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,9 @@ @implementation INAppStoreWindow {
INAppStoreWindowDelegateProxy *_delegateProxy;
INMovableByBackgroundContainerView *_titleBarContainer;
INMovableByBackgroundContainerView *_bottomBarContainer;

NSString *loadName;
NSRect framePatch;
}

@synthesize titleBarView = _titleBarView;
Expand Down Expand Up @@ -775,6 +778,10 @@ - (void)setTitleBarHeight:(CGFloat)newTitleBarHeight adjustWindowFrame:(BOOL)adj
if ((self.styleMask & NSTexturedBackgroundWindowMask) == NSTexturedBackgroundWindowMask) {
[self.contentView displayIfNeeded];
}

if (loadName) {
[self setFrame:framePatch display:NO];
}
}
}

Expand Down Expand Up @@ -1015,6 +1022,18 @@ - (void)setStyleMask:(NSUInteger)styleMask
_preventWindowFrameChange = NO;
}

-(BOOL)setFrameUsingName:(NSString *)name
{
BOOL result = NO;
if ([loadName isEqualToString:name]) {
return [super setFrameUsingName:name];
}
NSString *rectVal = [[NSUserDefaults standardUserDefaults] valueForKey:[@"NSWindow Frame " stringByAppendingString:name]];
framePatch = NSRectFromString(rectVal);
loadName = name;
return result;
}

- (void)setFrame:(NSRect)frameRect display:(BOOL)flag
{
if (!_preventWindowFrameChange)
Expand Down Expand Up @@ -1082,6 +1101,8 @@ - (void)_doInitialWindowSetup
[self _createBottomBarView];
[self _layoutTrafficLightsAndContent];
[self _setupTrafficLightsTrackingArea];

loadName = @"";
}

- (NSButton *)_windowButtonToLayout:(NSWindowButton)defaultButtonType orUserProvided:(NSButton *)userButton
Expand Down