Make sure that a detached view is really no longer the focus view.
MakeFocus(false) can not be trusted, since it is virtual and might not call the BView version. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24293 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4608,8 +4608,15 @@ BView::_Detach()
|
|||||||
|
|
||||||
// make sure our owner doesn't need us anymore
|
// make sure our owner doesn't need us anymore
|
||||||
|
|
||||||
if (fOwner->CurrentFocus() == this)
|
if (fOwner->CurrentFocus() == this) {
|
||||||
MakeFocus(false);
|
MakeFocus(false);
|
||||||
|
// MakeFocus() is virtual and might not be
|
||||||
|
// passing through to the BView version,
|
||||||
|
// but we need to make sure at this point
|
||||||
|
// that we are not the focus view anymore.
|
||||||
|
if (fOwner->CurrentFocus() == this)
|
||||||
|
fOwner->_SetFocus(NULL, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (fOwner->fDefaultButton == this)
|
if (fOwner->fDefaultButton == this)
|
||||||
fOwner->SetDefaultButton(NULL);
|
fOwner->SetDefaultButton(NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user