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

Unified Diff: ui/views/mus/screen_mus.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/mus/screen_mus.cc
diff --git a/ui/views/mus/screen_mus.cc b/ui/views/mus/screen_mus.cc
index eb853388771be0aefb5a1c16fcb54293dcf13673..57f90347e1f164779dba6bbc6d6e6ccb49d130ac 100644
--- a/ui/views/mus/screen_mus.cc
+++ b/ui/views/mus/screen_mus.cc
@@ -7,6 +7,7 @@
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "services/shell/public/cpp/connection.h"
#include "services/shell/public/cpp/connector.h"
+#include "ui/aura/window.h"
#include "ui/display/display_observer.h"
#include "ui/gfx/display_finder.h"
#include "ui/views/mus/screen_mus_delegate.h"
@@ -173,9 +174,8 @@ gfx::Point ScreenMus::GetCursorScreenPoint() {
return delegate_->GetCursorScreenPoint();
}
-gfx::NativeWindow ScreenMus::GetWindowUnderCursor() {
- NOTIMPLEMENTED();
- return nullptr;
+bool ScreenMus::IsWindowUnderCursor(gfx::NativeWindow window) {
+ return window->GetBoundsInScreen().Contains(GetCursorScreenPoint());
sky 2016/05/02 23:01:43 I think you should check drawn here too.
}
gfx::NativeWindow ScreenMus::GetWindowAtScreenPoint(const gfx::Point& point) {

Powered by Google App Engine
This is Rietveld 408576698