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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1324083002: Fix a mouse lock problem on Windows where in clicks outside the web page would also cause mouse loc… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: 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);
« 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