Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: ui/views/controls/menu/menu_controller.cc

Issue 1935083003: gfx::Screen: Replace GetWindowUnderCursor() with IsWindowUnderCursor(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Null checks Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 6290ab9e3edf2e8dddf0fb195635f3887ad7b42c..1dde6bcb3deb827f812b7603774fa64897aba906 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -1443,11 +1443,12 @@ bool MenuController::ShowSiblingMenu(SubmenuView* source,
return false;
}
- gfx::NativeWindow window_under_mouse =
- display::Screen::GetScreen()->GetWindowUnderCursor();
// TODO(oshima): Replace with views only API.
- if (!owner_ || window_under_mouse != owner_->GetNativeWindow())
+ if (!owner_ ||
+ !display::Screen::GetScreen()->IsWindowUnderCursor(
+ owner_->GetNativeWindow())) {
return false;
+ }
// The user moved the mouse outside the menu and over the owning window. See
// if there is a sibling menu we should show.

Powered by Google App Engine
This is Rietveld 408576698