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

Unified Diff: ui/aura/window.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition 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 | « ui/aura/test/test_screen.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 58728c2ea7a0a8245a15b643949dd3bceb912169..7d48cfa6b5bc37a77a8295a9b34abbcfda2d3edb 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -428,12 +428,12 @@ void Window::ConvertPointToTarget(const Window* source,
if (!source)
return;
if (source->GetRootWindow() != target->GetRootWindow()) {
- const gfx::Point source_origin =
- gfx::Screen::GetDisplayNearestWindow(
- const_cast<Window*>(source)).bounds().origin();
- const gfx::Point target_origin =
- gfx::Screen::GetDisplayNearestWindow(
- const_cast<Window*>(target)).bounds().origin();
+ Window* source_window = const_cast<Window*>(source);
+ Window* target_window = const_cast<Window*>(target);
+ const gfx::Point source_origin = gfx::Screen::GetScreenFor(source_window)->
+ GetDisplayNearestWindow(source_window).bounds().origin();
+ const gfx::Point target_origin = gfx::Screen::GetScreenFor(target_window)->
+ GetDisplayNearestWindow(target_window).bounds().origin();
ui::Layer::ConvertPointToLayer(
source->layer(), source->GetRootWindow()->layer(), point);
const gfx::Point offset = source_origin.Subtract(target_origin);
« no previous file with comments | « ui/aura/test/test_screen.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698