diff options
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/lock_state_controller.cc | 5 | ||||
-rw-r--r-- | ash/wm/window_manager_unittest.cc | 33 |
2 files changed, 1 insertions, 37 deletions
diff --git a/ash/wm/lock_state_controller.cc b/ash/wm/lock_state_controller.cc index 28a9b9b..9b5a5b5 100644 --- a/ash/wm/lock_state_controller.cc +++ b/ash/wm/lock_state_controller.cc @@ -269,7 +269,6 @@ void LockStateController::RequestShutdown() { shutting_down_ = true; Shell* shell = ash::Shell::GetInstance(); - shell->env_filter()->set_cursor_hidden_by_filter(false); shell->cursor_manager()->HideCursor(); animator_->StartGlobalAnimation( @@ -307,8 +306,8 @@ void LockStateController::OnAppTerminating() { if (!shutting_down_) { shutting_down_ = true; Shell* shell = ash::Shell::GetInstance(); - shell->env_filter()->set_cursor_hidden_by_filter(false); shell->cursor_manager()->HideCursor(); + shell->cursor_manager()->LockCursor(); animator_->StartAnimation( internal::SessionStateAnimator::kAllContainersMask, internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, @@ -364,7 +363,6 @@ void LockStateController::OnPreShutdownAnimationTimeout() { shutting_down_ = true; Shell* shell = ash::Shell::GetInstance(); - shell->env_filter()->set_cursor_hidden_by_filter(false); shell->cursor_manager()->HideCursor(); StartRealShutdownTimer(false); @@ -417,7 +415,6 @@ void LockStateController::OnRealShutdownTimeout() { void LockStateController::StartCancellableShutdownAnimation() { Shell* shell = ash::Shell::GetInstance(); // Hide cursor, but let it reappear if the mouse moves. - shell->env_filter()->set_cursor_hidden_by_filter(true); shell->cursor_manager()->HideCursor(); animator_->StartGlobalAnimation( diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc index 4ec141a..2b97e52 100644 --- a/ash/wm/window_manager_unittest.cc +++ b/ash/wm/window_manager_unittest.cc @@ -725,39 +725,6 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) { generator.ReleaseTouch(); EXPECT_TRUE(cursor_manager->IsCursorVisible()); EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled()); - - // If someone else made cursor invisible keep it invisible even after it - // received mouse events. - cursor_manager->EnableMouseEvents(); - cursor_manager->HideCursor(); - generator.MoveMouseTo(gfx::Point(0, 0)); - EXPECT_FALSE(cursor_manager->IsCursorVisible()); - EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled()); - generator.PressTouch(); - EXPECT_FALSE(cursor_manager->IsCursorVisible()); - EXPECT_FALSE(cursor_manager->IsMouseEventsEnabled()); - generator.MoveMouseTo(gfx::Point(0, 0)); - EXPECT_FALSE(cursor_manager->IsCursorVisible()); - EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled()); - generator.ReleaseTouch(); - EXPECT_FALSE(cursor_manager->IsCursorVisible()); - EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled()); - - // Back to normal. - cursor_manager->EnableMouseEvents(); - cursor_manager->ShowCursor(); - generator.MoveMouseTo(gfx::Point(0, 0)); - EXPECT_TRUE(cursor_manager->IsCursorVisible()); - EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled()); - generator.PressTouch(); - EXPECT_FALSE(cursor_manager->IsCursorVisible()); - EXPECT_FALSE(cursor_manager->IsMouseEventsEnabled()); - generator.MoveMouseTo(gfx::Point(0, 0)); - EXPECT_TRUE(cursor_manager->IsCursorVisible()); - EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled()); - generator.ReleaseTouch(); - EXPECT_TRUE(cursor_manager->IsCursorVisible()); - EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled()); } TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) { |