Chromium Code Reviews| Index: components/mus/ws/window_tree.cc |
| diff --git a/components/mus/ws/window_tree.cc b/components/mus/ws/window_tree.cc |
| index 863a3a13e61a2095581b0f08fac3b089e39daa76..60c540c83cb0ba776869339deb16b3386ae4a757 100644 |
| --- a/components/mus/ws/window_tree.cc |
| +++ b/components/mus/ws/window_tree.cc |
| @@ -18,6 +18,7 @@ |
| #include "components/mus/ws/platform_display.h" |
| #include "components/mus/ws/server_window.h" |
| #include "components/mus/ws/server_window_observer.h" |
| +#include "components/mus/ws/user_display_manager.h" |
| #include "components/mus/ws/window_manager_state.h" |
| #include "components/mus/ws/window_server.h" |
| #include "components/mus/ws/window_tree_binding.h" |
| @@ -669,6 +670,19 @@ WindowManagerState* WindowTree::GetWindowManagerStateForWindowManager() { |
| return wms; |
| } |
| +void WindowTree::GetCursorScreenPoint( |
| + const GetCursorScreenPointCallback& callback) { |
| + if (roots_.empty()) { |
|
Elliot Glaysher
2016/04/18 20:21:37
Is this empty roots thing a case we reasonably hav
sky
2016/04/18 20:53:05
Yes. It should be possible to query for the cursor
|
| + mojo::PointPtr p = mojo::Point::New(); |
| + p->x = 0; |
| + p->y = 0; |
| + callback.Run(std::move(p)); |
| + } else { |
| + callback.Run(mojo::Point::From( |
| + GetWindowManagerState(*roots_.begin())->GetCursorLocation())); |
| + } |
| +} |
| + |
| bool WindowTree::ShouldRouteToWindowManager(const ServerWindow* window) const { |
| // If the client created this window, then do not route it through the WM. |
| if (window->id().connection_id == id_) |