Fixed the possible race condition reported by stippi, by getting the bounds and parent offsets of the view on detach
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15736 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5615edfd4d
commit
b34197fb51
@ -4200,7 +4200,17 @@ BView::_UpdateStateForRemove()
|
||||
return;
|
||||
|
||||
fState->UpdateFrom(*fOwner->fLink);
|
||||
fBounds = Bounds();
|
||||
if (!fState->IsValid(B_VIEW_FRAME_BIT)) {
|
||||
fOwner->fLink->StartMessage(AS_LAYER_GET_COORD);
|
||||
|
||||
status_t code;
|
||||
if (fOwner->fLink->FlushWithReply(code) == B_OK
|
||||
&& code == B_OK) {
|
||||
fOwner->fLink->Read<BPoint>(const_cast<BPoint *>(&fParentOffset));
|
||||
fOwner->fLink->Read<BRect>(const_cast<BRect *>(&fBounds));
|
||||
fState->valid_flags |= B_VIEW_FRAME_BIT;
|
||||
}
|
||||
}
|
||||
|
||||
// update children as well
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user