diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index f0f941d09..babe6b074 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] && _platformWindow._hasInitializeInstanceWithWindow) + if (_platformWindow != [CPPlatformWindow primaryPlatformWindow] && [_platformWindow _hasInitializeInstanceWithWindow]) [_platformWindow setContentRect:[self frame]]; [self _setWindowView:windowView]; @@ -757,7 +757,7 @@ CPTexturedBackgroundWindowMask [self _moveChildWindows:delta]; } - if ([_platformWindow _shouldUpdateContentRect] && _isFullPlatformWindow && _platformWindow != [CPPlatformWindow primaryPlatformWindow]) + if ([_platformWindow _canUpdateContentRect] && _isFullPlatformWindow && _platformWindow != [CPPlatformWindow primaryPlatformWindow]) [_platformWindow setContentRect:aFrame]; } diff --git a/AppKit/Platform/CPPlatformWindow.j b/AppKit/Platform/CPPlatformWindow.j index 9afe9e15d..4fe4da01b 100644 --- a/AppKit/Platform/CPPlatformWindow.j +++ b/AppKit/Platform/CPPlatformWindow.j @@ -294,12 +294,17 @@ var PrimaryPlatformWindow = NULL; return _title; } -- (BOOL)_shouldUpdateContentRect +- (BOOL)_canUpdateContentRect { // We onyl update the contentRect with the frame of the bridgeless window if we have initialized the platform with the method initWithWindow: return _shouldUpdateContentRect && _hasInitializeInstanceWithWindow; } +- (BOOL)_hasInitializeInstanceWithWindow +{ + return _hasInitializeInstanceWithWindow; +} + - (void)_setShouldUpdateContentRect:(BOOL)aBoolean { _shouldUpdateContentRect = aBoolean;