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:
parent
be2eea8cf9
commit
6834052234
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user