OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/aura/window_tree_host.h" | 5 #include "ui/aura/window_tree_host.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "ui/aura/client/capture_client.h" | 8 #include "ui/aura/client/capture_client.h" |
9 #include "ui/aura/client/cursor_client.h" | 9 #include "ui/aura/client/cursor_client.h" |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 Window* capture_window = client::GetCaptureWindow(window()); | 250 Window* capture_window = client::GetCaptureWindow(window()); |
251 if (capture_window && capture_window->GetRootWindow() == window()) | 251 if (capture_window && capture_window->GetRootWindow() == window()) |
252 capture_window->ReleaseCapture(); | 252 capture_window->ReleaseCapture(); |
253 } | 253 } |
254 | 254 |
255 //////////////////////////////////////////////////////////////////////////////// | 255 //////////////////////////////////////////////////////////////////////////////// |
256 // WindowTreeHost, private: | 256 // WindowTreeHost, private: |
257 | 257 |
258 void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location, | 258 void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location, |
259 const gfx::Point& host_location) { | 259 const gfx::Point& host_location) { |
| 260 last_cursor_request_position_in_host_ = host_location; |
260 MoveCursorToNative(host_location); | 261 MoveCursorToNative(host_location); |
261 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 262 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
262 if (cursor_client) { | 263 if (cursor_client) { |
263 const gfx::Display& display = | 264 const gfx::Display& display = |
264 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); | 265 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); |
265 cursor_client->SetDisplay(display); | 266 cursor_client->SetDisplay(display); |
266 } | 267 } |
267 dispatcher()->OnCursorMovedToRootLocation(root_location); | 268 dispatcher()->OnCursorMovedToRootLocation(root_location); |
268 } | 269 } |
269 | 270 |
270 } // namespace aura | 271 } // namespace aura |
OLD | NEW |