Use content origin in screen coordinates for calculating popup menu position (#12180)
This commit is contained in:
parent
569b87ff83
commit
0937b84b01
1 changed files with 1 additions and 2 deletions
|
@ -33,8 +33,7 @@ void MenuViews::PopupAt(BrowserWindow* window,
|
||||||
if (x == -1 || y == -1) {
|
if (x == -1 || y == -1) {
|
||||||
location = display::Screen::GetScreen()->GetCursorScreenPoint();
|
location = display::Screen::GetScreen()->GetCursorScreenPoint();
|
||||||
} else {
|
} else {
|
||||||
views::View* view = native_window; // the instance is also its content view
|
gfx::Point origin = native_window->GetContentBounds().origin();
|
||||||
gfx::Point origin = view->bounds().origin();
|
|
||||||
location = gfx::Point(origin.x() + x, origin.y() + y);
|
location = gfx::Point(origin.x() + x, origin.y() + y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue