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

Side by Side Diff: services/ui/ws/window_tree.cc

Issue 2918553003: Implement a MoveCursorToScreenLocation for just the window manager. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 DCHECK(window_manager_state_); 2319 DCHECK(window_manager_state_);
2320 window_manager_state_->cursor_state().SetCursorVisible(visible); 2320 window_manager_state_->cursor_state().SetCursorVisible(visible);
2321 } 2321 }
2322 2322
2323 void WindowTree::WmSetGlobalOverrideCursor( 2323 void WindowTree::WmSetGlobalOverrideCursor(
2324 base::Optional<ui::CursorData> cursor) { 2324 base::Optional<ui::CursorData> cursor) {
2325 DCHECK(window_manager_state_); 2325 DCHECK(window_manager_state_);
2326 window_manager_state_->cursor_state().SetGlobalOverrideCursor(cursor); 2326 window_manager_state_->cursor_state().SetGlobalOverrideCursor(cursor);
2327 } 2327 }
2328 2328
2329 void WindowTree::WmMoveCursorToScreenLocationInPixels(
2330 const gfx::Point& screen_pixel_location) {
2331 DCHECK(window_manager_state_);
2332 // Here, I need to go from a screen location to a display location?
2333 //
2334 // TODO(erg): This is all wrong, I need to resolve this to work in the
2335 // multi-display case.
2336 window_manager_state_->SetCursorLocation(screen_pixel_location);
2337 }
2338
2329 void WindowTree::OnWmCreatedTopLevelWindow(uint32_t change_id, 2339 void WindowTree::OnWmCreatedTopLevelWindow(uint32_t change_id,
2330 Id transport_window_id) { 2340 Id transport_window_id) {
2331 ServerWindow* window = 2341 ServerWindow* window =
2332 GetWindowByClientId(ClientWindowId(transport_window_id)); 2342 GetWindowByClientId(ClientWindowId(transport_window_id));
2333 if (window && window->id().client_id != id_) { 2343 if (window && window->id().client_id != id_) {
2334 DVLOG(1) << "OnWmCreatedTopLevelWindow failed (invalid window id)"; 2344 DVLOG(1) << "OnWmCreatedTopLevelWindow failed (invalid window id)";
2335 window_server_->WindowManagerSentBogusMessage(); 2345 window_server_->WindowManagerSentBogusMessage();
2336 window = nullptr; 2346 window = nullptr;
2337 } 2347 }
2338 if (window) { 2348 if (window) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2502 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, 2512 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset,
2503 effect_bitmask, callback); 2513 effect_bitmask, callback);
2504 } 2514 }
2505 2515
2506 void WindowTree::PerformOnDragDropDone() { 2516 void WindowTree::PerformOnDragDropDone() {
2507 client()->OnDragDropDone(); 2517 client()->OnDragDropDone();
2508 } 2518 }
2509 2519
2510 } // namespace ws 2520 } // namespace ws
2511 } // namespace ui 2521 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698