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

Unified Diff: ui/aura/env.h

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
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ui/aura/env.cc » ('j') | ui/aura/env.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/env.h
diff --git a/ui/aura/env.h b/ui/aura/env.h
index e5a1952a51969a391445fe088a556b61e355e0ff..ffec69bdc044cb4658589a5e315d72af1425a8b6 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -51,6 +51,10 @@ class AURA_EXPORT Env {
void SetLastMouseLocation(const Window& window,
const gfx::Point& location_in_root);
+ // If |cursor_shown| is false, sets the last_mouse_position to an invalid
+ // location. If |cursor_shown| is true, restores the last_mouse_position.
+ void SetCursorShown(bool cursor_shown);
+
// Whether any touch device is currently down.
bool is_touch_down() const { return is_touch_down_; }
void set_touch_down(bool value) { is_touch_down_ = value; }
@@ -100,6 +104,9 @@ class AURA_EXPORT Env {
int mouse_button_flags_;
// Location of last mouse event, in screen coordinates.
gfx::Point last_mouse_location_;
+ // If the cursor is hidden, saves the previous last_mouse_position.
+ gfx::Point hidden_cursor_location_;
+ bool is_cursor_hidden_;
bool is_touch_down_;
bool render_white_bg_;
client::StackingClient* stacking_client_;
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ui/aura/env.cc » ('j') | ui/aura/env.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698