* Fixes a small regression introduced in r29728, don't return B_ERROR if we couldn't lock
the popup's window, in this case the window just closed, so we go on with archiving then. There's still a (rarely occuring) problem with the unlocking though, probably due to some BMenu funkyness, will investigate, left a TODO. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29947 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1a7cbee5c2
commit
642cc1315d
@ -118,13 +118,17 @@ BDragger::Archive(BMessage *data, bool deep) const
|
||||
BMessage popupMsg;
|
||||
|
||||
if (fPopUp) {
|
||||
if (fPopUp->Window()->Lock()) {
|
||||
ret = fPopUp->Archive(&popupMsg, deep);
|
||||
if (ret == B_OK)
|
||||
ret = data->AddMessage("_popup", &popupMsg);
|
||||
bool windowLocked = fPopUp->Window()->Lock();
|
||||
|
||||
ret = fPopUp->Archive(&popupMsg, deep);
|
||||
|
||||
if (windowLocked)
|
||||
fPopUp->Window()->Unlock();
|
||||
} else
|
||||
ret = B_ERROR;
|
||||
// TODO: Investigate, in some (rare) occasions the menu window
|
||||
// has already been unlocked
|
||||
|
||||
if (ret == B_OK)
|
||||
ret = data->AddMessage("_popup", &popupMsg);
|
||||
}
|
||||
|
||||
if (ret == B_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user