mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 00:11:15 +00:00
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:
parent
e8de70e645
commit
ca944f1dfa
2 changed files with 6 additions and 14 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue