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
+10 -2
View File
@@ -736,8 +736,12 @@ BView::ConvertFromScreen(BPoint pt) const
void void
BView::ConvertToScreen(BRect *rect) const BView::ConvertToScreen(BRect *rect) const
{ {
if (!fParent) if (!fParent) {
if (fOwner)
fOwner->ConvertToScreen(rect);
return; return;
}
do_owner_check_no_pick(); do_owner_check_no_pick();
@@ -758,8 +762,12 @@ BView::ConvertToScreen(BRect rect) const
void void
BView::ConvertFromScreen(BRect *rect) const BView::ConvertFromScreen(BRect *rect) const
{ {
if (!fParent) if (!fParent) {
if (fOwner)
fOwner->ConvertFromScreen(rect);
return; return;
}
do_owner_check_no_pick(); do_owner_check_no_pick();