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

Unified Diff: ash/ui_controls_ash.cc

Issue 11033038: Fix the issue of cursor's device scale factor when using monitors with differnt device scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a comment Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ash/wm/workspace/snap_sizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/ui_controls_ash.cc
diff --git a/ash/ui_controls_ash.cc b/ash/ui_controls_ash.cc
index c3e8b0b5a71d0e09ada7fb7d9de0def2ed22f6e4..3ff3b46c1260b0b3b41f6180c2a9bb9320ebc8c9 100644
--- a/ash/ui_controls_ash.cc
+++ b/ash/ui_controls_ash.cc
@@ -32,24 +32,18 @@ ui_controls::UIControlsAura* GetUIControlsForRootWindow(
return native_ui_control;
}
-// Returns the UIControls object for the RootWindow at the |point| in
-// virtual screen coordinates, and updates the |point| relative to the
+// Returns the UIControls object for the RootWindow at the |point_in_screen|
+// in virtual screen coordinates, and updates the |point| relative to the
// UIControlsAura's root window. NULL if there is no RootWindow under
-// the |point|.
-ui_controls::UIControlsAura* GetUIControlsAt(gfx::Point* point) {
- // If there is a capture events must be relative to it.
- aura::client::CaptureClient* capture_client =
- GetCaptureClient(ash::Shell::GetInstance()->GetPrimaryRootWindow());
- aura::RootWindow* root = NULL;
- if (capture_client && capture_client->GetCaptureWindow())
- root = capture_client->GetCaptureWindow()->GetRootWindow();
- else
- root = wm::GetRootWindowAt(*point);
+// the |point_in_screen|.
+ui_controls::UIControlsAura* GetUIControlsAt(gfx::Point* point_in_screen) {
+ // TODO(mazda): Support the case passive grab is taken.
+ aura::RootWindow* root = wm::GetRootWindowAt(*point_in_screen);
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(root);
if (screen_position_client)
- screen_position_client->ConvertPointFromScreen(root, point);
+ screen_position_client->ConvertPointFromScreen(root, point_in_screen);
return GetUIControlsForRootWindow(root);
}
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ash/wm/workspace/snap_sizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698