The BRect version of ConvertTo/FromScreen were broken in case the view didn't have a parent, but was the child of a BWindow. This fixes a bug in menus (and probably other stuff too)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13400 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-07-02 13:16:17 +00:00
parent be2eea8cf9
commit 6834052234

View File

@ -736,9 +736,13 @@ BView::ConvertFromScreen(BPoint pt) const
void
BView::ConvertToScreen(BRect *rect) const
{
if (!fParent)
return;
if (!fParent) {
if (fOwner)
fOwner->ConvertToScreen(rect);
return;
}
do_owner_check_no_pick();
ConvertToParent(rect);
@ -758,9 +762,13 @@ BView::ConvertToScreen(BRect rect) const
void
BView::ConvertFromScreen(BRect *rect) const
{
if (!fParent)
return;
if (!fParent) {
if (fOwner)
fOwner->ConvertFromScreen(rect);
return;
}
do_owner_check_no_pick();
ConvertFromParent(rect);