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

Unified Diff: ui/aura/root_window.cc

Issue 10829180: Move cursor when it's hidden so that UX can update correctly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable test for windows Created 8 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
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 9c22cbe20083e1da2e677cf2bd52f793f7be879e..a82ddd6931381b97629510e6656c2a0a5144cb9b 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -231,8 +231,14 @@ void RootWindow::SetCursor(gfx::NativeCursor cursor) {
}
void RootWindow::ShowCursor(bool show) {
- cursor_shown_ = show;
- host_->ShowCursor(show);
+ // Send entered / exited so that visual state can be updated to match
+ // cursor state.
+ if (show != cursor_shown_) {
+ cursor_shown_ = show;
+ host_->ShowCursor(show);
+ Env::GetInstance()->SetCursorShown(show);
+ PostMouseMoveEventAfterWindowChange();
+ }
}
void RootWindow::MoveCursorTo(const gfx::Point& location_in_dip) {
« ui/aura/env.cc ('K') | « ui/aura/env.cc ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698