mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Fix bug where a stray view could leak when changing the content view
of a window. This view then could make the title bar buttons inaccessible when -gui handles window decorations. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32163 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b07303eb41
commit
92da3e62d0
1 changed files with 8 additions and 1 deletions
|
@ -1160,7 +1160,14 @@ many times.
|
|||
}
|
||||
if (_contentView != nil)
|
||||
{
|
||||
[_contentView removeFromSuperview];
|
||||
/* 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 = aView;
|
||||
|
||||
|
|
Loading…
Reference in a new issue