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

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: compile fixes 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..e1ce83b5fb9ccd0dcb4adc20b7901e58307dbf57 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -1443,10 +1443,10 @@ 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())
+ bool window_under_mouse = display::Screen::GetScreen()->
+ IsWindowUnderCursor(owner_->GetNativeWindow());
sky 2016/05/02 23:01:43 This crashes if owner_ is null.
+ if (!owner_ || !window_under_mouse)
return false;
// The user moved the mouse outside the menu and over the owning window. See

Powered by Google App Engine
This is Rietveld 408576698