Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
index 8d3df3bd923206398feeb86662585936116c3336..77289728fc732dddf375ecc521104d06ba872e32 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -1522,11 +1522,13 @@ void RenderWidgetHostViewAura::UnlockMouse() { |
mouse_locked_ = false; |
-#if !defined(OS_WIN) |
- window_->ReleaseCapture(); |
-#else |
+ if (window_->HasCapture()) |
+ window_->ReleaseCapture(); |
+ |
+#if defined(OS_WIN) |
::ClipCursor(NULL); |
#endif |
+ |
window_->MoveCursorTo(unlocked_mouse_position_); |
aura::client::CursorClient* cursor_client = |
aura::client::GetCursorClient(root_window); |