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

Unified Diff: ash/display/screen_ash.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: ash/display/screen_ash.cc
diff --git a/ash/display/screen_ash.cc b/ash/display/screen_ash.cc
index 0f30c3567587ff8fcf930574e1315b3ccff15b32..71cb7a434eaf42d0faa5174c4e962472994f29da 100644
--- a/ash/display/screen_ash.cc
+++ b/ash/display/screen_ash.cc
@@ -38,7 +38,7 @@ class ScreenForShutdown : public display::Screen {
// display::Screen overrides:
gfx::Point GetCursorScreenPoint() override { return gfx::Point(); }
- gfx::NativeWindow GetWindowUnderCursor() override { return NULL; }
+ bool IsWindowUnderCursor(gfx::NativeWindow window) override { return false; }
gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override {
return NULL;
}
@@ -104,9 +104,9 @@ gfx::Point ScreenAsh::GetCursorScreenPoint() {
return aura::Env::GetInstance()->last_mouse_location();
}
-gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() {
+bool ScreenAsh::IsWindowUnderCursor(gfx::NativeWindow window) {
return GetWindowAtScreenPoint(
- display::Screen::GetScreen()->GetCursorScreenPoint());
+ display::Screen::GetScreen()->GetCursorScreenPoint()) == window;
}
gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) {

Powered by Google App Engine
This is Rietveld 408576698