From be9f5ad95112a19767de92a0049dbcfa9d3e8979 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Thu, 30 Oct 2014 18:04:20 -0700 Subject: [PATCH] Fixed: issue when initialize with contentRect in CPPlatformWindow --- AppKit/CPWindow/CPWindow.j | 2 +- AppKit/Platform/CPPlatformWindow.j | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index b749b8768..f0f941d09 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -569,7 +569,7 @@ CPTexturedBackgroundWindowMask var fullPlatformWindowViewClass = [[self class] _windowViewClassForFullPlatformWindowStyleMask:_styleMask], windowView = [[fullPlatformWindowViewClass alloc] initWithFrame:CGRectMakeZero() styleMask:_styleMask]; - if (_platformWindow != [CPPlatformWindow primaryPlatformWindow]) + if (_platformWindow != [CPPlatformWindow primaryPlatformWindow] && _platformWindow._hasInitializeInstanceWithWindow) [_platformWindow setContentRect:[self frame]]; [self _setWindowView:windowView]; diff --git a/AppKit/Platform/CPPlatformWindow.j b/AppKit/Platform/CPPlatformWindow.j index e88a1ebf3..9afe9e15d 100644 --- a/AppKit/Platform/CPPlatformWindow.j +++ b/AppKit/Platform/CPPlatformWindow.j @@ -122,9 +122,9 @@ var PrimaryPlatformWindow = NULL; { self = [self initWithContentRect:CGRectMakeCopy([aWindow frame])]; + _hasInitializeInstanceWithWindow = YES; [aWindow setPlatformWindow:self]; [aWindow setFullPlatformWindow:YES]; - _hasInitializeInstanceWithWindow = YES; return self; }