Set _windowNum to 0 so the backend window will be recreated when required.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16715 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-05-13 18:26:20 +00:00
parent 30941d3bd5
commit 8184380380
2 changed files with 17 additions and 2 deletions

View file

@ -613,6 +613,12 @@ static NSNotificationCenter *nc = nil;
defer: NO];
}
/*
It is important to make sure that the window is in a meaningful state after
this has been called, and that the backend window can be recreated later,
since one-shot windows may have their backend windows created and terminated
many times.
*/
- (void) _terminateBackendWindow
{
NSGraphicsContext *context = GSCurrentContext();
@ -628,6 +634,7 @@ static NSNotificationCenter *nc = nil;
{
[GSServerForWindow(self) termwindow: _windowNum];
NSMapRemove(windowmaps, (void*)_windowNum);
_windowNum = 0;
}
}
@ -1394,7 +1401,7 @@ static NSNotificationCenter *nc = nil;
/* Windows need to be constrained when displayed or resized - but only
titled windows are constrained. Also, and this is the tricky part,
don't constrain if we are merely unhidding the window or if it's
already visible and is just being reordered. */
already visible and is just being reordered. */
if ((_styleMask & NSTitledWindowMask)
&& [NSApp isHidden] == NO
&& _f.visible == NO)
@ -1419,7 +1426,7 @@ static NSNotificationCenter *nc = nil;
[_contentView display];
else
[_contentView displayIfNeeded];
[srv orderwindow: place : otherWin : _windowNum];
if (display)
[self display];