Chromium Code Reviews| Index: ui/views/mus/screen_mus.cc |
| diff --git a/ui/views/mus/screen_mus.cc b/ui/views/mus/screen_mus.cc |
| index 84cf5b4dd8b015a1815177116048be224510098e..c3701c40ecbf3179cebcfac687923912a055ea08 100644 |
| --- a/ui/views/mus/screen_mus.cc |
| +++ b/ui/views/mus/screen_mus.cc |
| @@ -11,6 +11,7 @@ |
| #include "services/shell/public/cpp/connection.h" |
| #include "services/shell/public/cpp/connector.h" |
| #include "ui/aura/window.h" |
| +#include "ui/views/mus/native_widget_mus.h" |
| #include "ui/views/mus/screen_mus_delegate.h" |
| #include "ui/views/mus/window_manager_frame_values.h" |
| @@ -81,6 +82,18 @@ bool ScreenMus::IsWindowUnderCursor(gfx::NativeWindow window) { |
| window->GetBoundsInScreen().Contains(GetCursorScreenPoint()); |
| } |
| +gfx::NativeWindow ScreenMus::GetWindowAtScreenPoint(const gfx::Point& point) { |
| + aura::Window* aura_window = nullptr; |
| + ui::Window* ui_window = delegate_->GetWindowAtScreenPoint(point); |
| + if (ui_window) { |
| + NativeWidgetMus* nw_mus = NativeWidgetMus::GetForWindow(ui_window); |
| + if (nw_mus) |
| + aura_window = |
| + static_cast<internal::NativeWidgetPrivate*>(nw_mus)->GetNativeView(); |
|
Elliot Glaysher
2016/10/04 22:27:19
AFAICT based on the windows implementation of GetW
|
| + } |
| + return aura_window; |
| +} |
| + |
| void ScreenMus::OnDisplays(mojo::Array<ui::mojom::WsDisplayPtr> ws_displays) { |
| // This should only be called once from Init() before any observers have been |
| // added. |