| Index: ui/views/controls/menu/menu_controller.cc
|
| diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
|
| index 7fbccfb223b8e7d5e2df0610efa01d083c8ee63a..ec43f094a930b418f0f6976cf423ba478c980ca0 100644
|
| --- a/ui/views/controls/menu/menu_controller.cc
|
| +++ b/ui/views/controls/menu/menu_controller.cc
|
| @@ -704,7 +704,8 @@ void MenuController::OnDragExitedScrollButton(SubmenuView* source) {
|
|
|
| void MenuController::UpdateSubmenuSelection(SubmenuView* submenu) {
|
| if (submenu->IsShowing()) {
|
| - gfx::Point point = gfx::Screen::GetCursorScreenPoint();
|
| + gfx::Point point = gfx::Screen::GetCursorScreenPoint(
|
| + gfx::Screen::BadTwoWorldsContext());
|
| const SubmenuView* root_submenu =
|
| submenu->GetMenuItem()->GetRootMenuItem()->GetSubmenu();
|
| views::View::ConvertPointFromScreen(
|
| @@ -1109,13 +1110,14 @@ void MenuController::UpdateInitialLocation(
|
| // Calculate the bounds of the monitor we'll show menus on. Do this once to
|
| // avoid repeated system queries for the info.
|
| pending_state_.monitor_bounds = gfx::Screen::GetDisplayNearestPoint(
|
| - bounds.origin()).work_area();
|
| + gfx::Screen::BadTwoWorldsContext(), bounds.origin()).work_area();
|
| #if defined(USE_ASH)
|
| if (!pending_state_.monitor_bounds.Contains(bounds)) {
|
| // Use the monitor area if the work area doesn't contain the bounds. This
|
| // handles showing a menu from the launcher.
|
| gfx::Rect monitor_area =
|
| - gfx::Screen::GetDisplayNearestPoint(bounds.origin()).bounds();
|
| + gfx::Screen::GetDisplayNearestPoint(
|
| + gfx::Screen::BadTwoWorldsContext(), bounds.origin()).bounds();
|
| if (monitor_area.Contains(bounds))
|
| pending_state_.monitor_bounds = monitor_area;
|
| }
|
| @@ -1149,7 +1151,8 @@ bool MenuController::ShowSiblingMenu(SubmenuView* source,
|
| }
|
|
|
| gfx::NativeWindow window_under_mouse =
|
| - gfx::Screen::GetWindowAtCursorScreenPoint();
|
| + gfx::Screen::GetWindowAtCursorScreenPoint(
|
| + gfx::Screen::BadTwoWorldsContext());
|
| // TODO(oshima): Replace with views only API.
|
| if (window_under_mouse != owner_->GetNativeWindow())
|
| return false;
|
|
|