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:
@@ -736,9 +736,13 @@ BView::ConvertFromScreen(BPoint pt) const
|
|||||||
void
|
void
|
||||||
BView::ConvertToScreen(BRect *rect) const
|
BView::ConvertToScreen(BRect *rect) const
|
||||||
{
|
{
|
||||||
if (!fParent)
|
if (!fParent) {
|
||||||
return;
|
if (fOwner)
|
||||||
|
fOwner->ConvertToScreen(rect);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
do_owner_check_no_pick();
|
do_owner_check_no_pick();
|
||||||
|
|
||||||
ConvertToParent(rect);
|
ConvertToParent(rect);
|
||||||
@@ -758,9 +762,13 @@ BView::ConvertToScreen(BRect rect) const
|
|||||||
void
|
void
|
||||||
BView::ConvertFromScreen(BRect *rect) const
|
BView::ConvertFromScreen(BRect *rect) const
|
||||||
{
|
{
|
||||||
if (!fParent)
|
if (!fParent) {
|
||||||
return;
|
if (fOwner)
|
||||||
|
fOwner->ConvertFromScreen(rect);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
do_owner_check_no_pick();
|
do_owner_check_no_pick();
|
||||||
|
|
||||||
ConvertFromParent(rect);
|
ConvertFromParent(rect);
|
||||||
|
|||||||
Reference in New Issue
Block a user