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..e0f197215f0abd80a84924f0ff622430aa8d8ceb 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. Events are reported in |
+ // the currently focused window coordinates. So when the cursor leaves the |
oshima
2014/08/06 21:59:33
Passive grab has nothing to do with focus. See
htt
|
+ // window we need properly convert the event. |
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); |