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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_win.cc

Issue 49383004: Ensure on Windows AURA that the cursor stays within the bounds of the window during a LockMouse ope… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 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: ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
===================================================================
--- ui/views/widget/desktop_aura/desktop_root_window_host_win.cc (revision 231601)
+++ ui/views/widget/desktop_aura/desktop_root_window_host_win.cc (working copy)
@@ -467,13 +467,17 @@
}
bool DesktopRootWindowHostWin::ConfineCursorToRootWindow() {
- return false;
+ RECT window_rect = root_window_->GetBoundsInScreen().ToRECT();
+ ::ClipCursor(&window_rect);
+ return true;
}
void DesktopRootWindowHostWin::UnConfineCursor() {
+ ::ClipCursor(NULL);
}
void DesktopRootWindowHostWin::OnCursorVisibilityChanged(bool show) {
+ ::ShowCursor(!!show);
}
void DesktopRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
« content/browser/renderer_host/render_widget_host_view_aura.cc ('K') | « ui/aura/root_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698