mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-18 12:39:22 +00:00
Fix for setting a new platform window on a visisble window throwing a DOM exception.
This commit is contained in:
1 parent
0f88207d7b
commit
cd05d30f86
1 file changed
+15
-1
@@ -466,12 +466,26 @@ CPTexturedBackgroundWindowMask
|
||||
return _platformWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the platform window of the reciver.
|
||||
This method will first close the reciever,
|
||||
change the platform window, then reopen the window (if it was originally open).
|
||||
*/
|
||||
- (void)setPlatformWindow:(CPPlatformWindow)aPlatformWindow
|
||||
{
|
||||
// FIXME: already visible.
|
||||
var wasVisible = [self isVisible];
|
||||
|
||||
// we have to close it first, otherwise we get a DOM exception.
|
||||
if (wasVisible)
|
||||
[self close];
|
||||
|
||||
_platformWindow = aPlatformWindow;
|
||||
|
||||
if (wasVisible)
|
||||
[self orderFront:self];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
@ignore
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user