mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Fixed: refactoring of CPPlatformWindow
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user