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

Unified Diff: ash/display/screen_position_controller.cc

Issue 440133002: [Ozone] Fix ScreenPositionControllerTest.ConvertHostPointToScreen* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/screen_position_controller.cc
diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc
index 6ab4b5489e3adee83f537369326e88a26ea45d6b..860b53e038f32bb907f7f758aacd12a238897d65 100644
--- a/ash/display/screen_position_controller.cc
+++ b/ash/display/screen_position_controller.cc
@@ -72,7 +72,7 @@ std::pair<aura::Window*, gfx::Point> GetRootWindowRelativeToWindow(
gfx::Point location_in_root(location);
aura::Window::ConvertPointToTarget(window, root_window, &location_in_root);
-#if defined(USE_X11)
+#if defined(USE_X11) || defined(USE_OZONE)
if (!root_window->ContainsPointInRoot(location_in_root)) {
// This conversion is necessary to deal with X's passive input
// grab while dragging window. For example, if we have two
@@ -89,6 +89,10 @@ std::pair<aura::Window*, gfx::Point> GetRootWindowRelativeToWindow(
// layout in Ash). We need to figure out that (0, 1123) in the
// primary root window's coordinates is actually (0, 123) in the
// extended root window's coordinates.
+ //
+ // For now Ozone works in a similar manner as X11. Transitioning from one
+ // display's coordinate system to anothers may cause events in the
+ // primary's coordinate system which fall in the extended display.
gfx::Point location_in_native(location_in_root);
root_window->GetHost()->ConvertPointToNativeScreen(&location_in_native);
@@ -107,6 +111,7 @@ std::pair<aura::Window*, gfx::Point> GetRootWindowRelativeToWindow(
}
#else
// TODO(yusukes): Support non-X11 platforms if necessary.
+ NOTIMPLEMENTED();
#endif
return std::make_pair(root_window, location_in_root);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698