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

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

Issue 10982040: Fix mouse lock on chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comment Created 8 years, 3 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 | « ash/wm/window_manager_unittest.cc ('k') | ui/aura/shared/compound_event_filter.h » ('j') | 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 70b5050dc83bf039769a6d1c05c9834317969a4d..8d4124abd4fb984d70cc79530b59edb662f318ce 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1464,6 +1464,12 @@ ui::EventResult RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) {
ui::EventResult RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) {
TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnMouseEvent");
if (mouse_locked_) {
+ // Hide the cursor if someone else has shown it.
+ aura::client::CursorClient* cursor_client =
+ aura::client::GetCursorClient(window_->GetRootWindow());
+ if (cursor_client && cursor_client->IsCursorVisible())
+ cursor_client->ShowCursor(false);
+
WebKit::WebMouseEvent mouse_event = MakeWebMouseEvent(event);
gfx::Point center(gfx::Rect(window_->bounds().size()).CenterPoint());
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | ui/aura/shared/compound_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698