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

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

Issue 2680883002: Fixes bugs in cursor handling (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_tree_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_server.h" 5 #include "services/ui/ws/window_server.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 589 }
590 590
591 void WindowServer::UpdateNativeCursorIfOver(ServerWindow* window) { 591 void WindowServer::UpdateNativeCursorIfOver(ServerWindow* window) {
592 WindowManagerDisplayRoot* display_root = 592 WindowManagerDisplayRoot* display_root =
593 display_manager_->GetWindowManagerDisplayRoot(window); 593 display_manager_->GetWindowManagerDisplayRoot(window);
594 if (!display_root) 594 if (!display_root)
595 return; 595 return;
596 596
597 EventDispatcher* event_dispatcher = 597 EventDispatcher* event_dispatcher =
598 display_root->window_manager_state()->event_dispatcher(); 598 display_root->window_manager_state()->event_dispatcher();
599 if (window != event_dispatcher->mouse_cursor_source_window()) 599 if (window != event_dispatcher->GetWindowForMouseCursor())
600 return; 600 return;
601 601
602 event_dispatcher->UpdateNonClientAreaForCurrentWindow(); 602 event_dispatcher->UpdateNonClientAreaForCurrentWindow();
603 display_root->display()->UpdateNativeCursor( 603 display_root->display()->UpdateNativeCursor(
604 event_dispatcher->GetCurrentMouseCursor()); 604 event_dispatcher->GetCurrentMouseCursor());
605 } 605 }
606 606
607 bool WindowServer::IsUserInHighContrastMode(const UserId& user) const { 607 bool WindowServer::IsUserInHighContrastMode(const UserId& user) const {
608 const auto iter = high_contrast_mode_.find(user); 608 const auto iter = high_contrast_mode_.find(user);
609 return (iter == high_contrast_mode_.end()) ? false : iter->second; 609 return (iter == high_contrast_mode_.end()) ? false : iter->second;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 void WindowServer::OnUserIdAdded(const UserId& id) { 811 void WindowServer::OnUserIdAdded(const UserId& id) {
812 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 812 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
813 } 813 }
814 814
815 void WindowServer::OnUserIdRemoved(const UserId& id) { 815 void WindowServer::OnUserIdRemoved(const UserId& id) {
816 activity_monitor_map_.erase(id); 816 activity_monitor_map_.erase(id);
817 } 817 }
818 818
819 } // namespace ws 819 } // namespace ws
820 } // namespace ui 820 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698