mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-06 20:55:32 +00:00
Adding checks for existence of DOM when calling CPPlatformWindow+DOM-only methods
Conflicts: AppKit/CPWindow/CPWindow.j
This commit is contained in:
1 parent
ab3d648244
commit
c8759babae
3 files changed
+15
-1
No files matched your search
@@ -615,7 +615,11 @@ CPRunContinuesResponse = -1002;
|
||||
*/
|
||||
- (CPArray)orderedWindows
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
return CPWindowObjectList();
|
||||
#else
|
||||
return [];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)hide:(id)aSender
|
||||
|
||||
@@ -742,8 +742,10 @@ CPTexturedBackgroundWindowMask
|
||||
*/
|
||||
- (void)orderFront:(id)aSender
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
[_platformWindow orderFront:self];
|
||||
[_platformWindow order:CPWindowAbove window:self relativeTo:nil];
|
||||
#endif
|
||||
|
||||
if (_firstResponder === self || !_firstResponder)
|
||||
[self makeFirstResponder:[self initialFirstResponder]];
|
||||
@@ -771,13 +773,17 @@ CPTexturedBackgroundWindowMask
|
||||
*/
|
||||
- (void)orderOut:(id)aSender
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
if ([self _sharesChromeWithPlatformWindow])
|
||||
[_platformWindow orderOut:self];
|
||||
#endif
|
||||
|
||||
if ([_delegate respondsToSelector:@selector(windowWillClose:)])
|
||||
[_delegate windowWillClose:self];
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
[_platformWindow order:CPWindowOut window:self relativeTo:nil];
|
||||
#endif
|
||||
|
||||
[self _updateMainAndKeyWindows];
|
||||
}
|
||||
@@ -789,7 +795,9 @@ CPTexturedBackgroundWindowMask
|
||||
*/
|
||||
- (void)orderWindow:(CPWindowOrderingMode)aPlace relativeTo:(int)otherWindowNumber
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
[_platformWindow order:aPlace window:self relativeTo:CPApp._windows[otherWindowNumber]];
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -160,7 +160,9 @@ var PrimaryPlatformWindow = NULL;
|
||||
|
||||
_contentRect = _CGRectMakeCopy(aRect);
|
||||
|
||||
[self updateNativeContentRect];
|
||||
#if PLATFORM(DOM)
|
||||
[self updateNativeContentRect];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)updateFromNativeContentRect
|
||||
|
||||
Reference in new issue
Block a user