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

@ -1,3 +1,11 @@
2003-05-13 20:19 Alexander Malmberg <alexander@malmberg.org>
* Source/NSButton.m (-setState:, -setNextState): Mark the view
as needing display, don't force a display.
* Source/NSWindow.m (-_terminateBackendWindow): Set _windowNum to 0
so the window will be recreated the next time it is needed.
2003-05-12 17:30 Alexander Malmberg <alexander@malmberg.org> 2003-05-12 17:30 Alexander Malmberg <alexander@malmberg.org>
* Source/NSView.m (-lockFocusInRect:): Don't save the clipping path * Source/NSView.m (-lockFocusInRect:): Don't save the clipping path

View file

@ -613,6 +613,12 @@ static NSNotificationCenter *nc = nil;
defer: NO]; 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 - (void) _terminateBackendWindow
{ {
NSGraphicsContext *context = GSCurrentContext(); NSGraphicsContext *context = GSCurrentContext();
@ -628,6 +634,7 @@ static NSNotificationCenter *nc = nil;
{ {
[GSServerForWindow(self) termwindow: _windowNum]; [GSServerForWindow(self) termwindow: _windowNum];
NSMapRemove(windowmaps, (void*)_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 /* Windows need to be constrained when displayed or resized - but only
titled windows are constrained. Also, and this is the tricky part, 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 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) if ((_styleMask & NSTitledWindowMask)
&& [NSApp isHidden] == NO && [NSApp isHidden] == NO
&& _f.visible == NO) && _f.visible == NO)
@ -1419,7 +1426,7 @@ static NSNotificationCenter *nc = nil;
[_contentView display]; [_contentView display];
else else
[_contentView displayIfNeeded]; [_contentView displayIfNeeded];
[srv orderwindow: place : otherWin : _windowNum]; [srv orderwindow: place : otherWin : _windowNum];
if (display) if (display)
[self display]; [self display];