зеркало из https://github.com/electron/electron.git
Use content origin in screen coordinates for calculating popup menu position (#12180)
This commit is contained in:
Родитель
569b87ff83
Коммит
0937b84b01
|
@ -33,8 +33,7 @@ void MenuViews::PopupAt(BrowserWindow* window,
|
|||
if (x == -1 || y == -1) {
|
||||
location = display::Screen::GetScreen()->GetCursorScreenPoint();
|
||||
} else {
|
||||
views::View* view = native_window; // the instance is also its content view
|
||||
gfx::Point origin = view->bounds().origin();
|
||||
gfx::Point origin = native_window->GetContentBounds().origin();
|
||||
location = gfx::Point(origin.x() + x, origin.y() + y);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче