Revert Wolfgangs change and add a different solution as explained in his mail.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32176 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-02-15 19:50:54 +00:00
parent e8de70e645
commit ca944f1dfa
2 changed files with 6 additions and 14 deletions

View file

@ -1160,22 +1160,9 @@ many times.
if (aView == _contentView)
return;
if (aView == nil)
{
aView = AUTORELEASE([[NSView alloc]
initWithFrame:
[self contentRectForFrameRect: _frame]]);
}
if (_contentView != nil)
{
/* NB It is important to set _contentView to nil *before* removing
the content view from its superview. Otherwise, the window decoration
view would call back into this method with aView==nil and we would
leak a stray content view that may eventually hide the title bar
buttons when -gui handles window decorations. */
NSView *tmpView = _contentView;
_contentView = nil;
[tmpView removeFromSuperview];
[_contentView removeFromSuperview];
}
_contentView = aView;