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

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

Issue 9808010: Keep the mouse cursor within desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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
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 320fe53157a8029d34ceb7f142b2d6fd023b2d6d..6aab08a49370b4a31a297430e57df273196b69aa 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -620,19 +620,14 @@ bool RenderWidgetHostViewAura::LockMouse() {
mouse_locked_ = true;
+ // TODO(oshima): Support Window::ConfineCursorToWindow.
varunjain 2012/03/23 16:56:01 Please also make sure that we are ok with mouse lo
oshima 2012/03/23 18:25:09 will do.
root_window->SetCapture(window_);
- if (root_window->ConfineCursorToWindow()) {
- root_window->ShowCursor(false);
- synthetic_move_sent_ = true;
- root_window->MoveCursorTo(window_->bounds().CenterPoint());
- if (aura::client::GetTooltipClient(root_window))
- aura::client::GetTooltipClient(root_window)->SetTooltipsEnabled(false);
- return true;
- } else {
- mouse_locked_ = false;
- root_window->ReleaseCapture(window_);
- return false;
- }
+ root_window->ShowCursor(false);
+ synthetic_move_sent_ = true;
+ root_window->MoveCursorTo(window_->bounds().CenterPoint());
+ if (aura::client::GetTooltipClient(root_window))
+ aura::client::GetTooltipClient(root_window)->SetTooltipsEnabled(false);
+ return true;
}
void RenderWidgetHostViewAura::UnlockMouse() {
« no previous file with comments | « base/message_pump_x.h ('k') | ui/aura/aura.gyp » ('j') | ui/aura/root_window_host_linux.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698