Chromium Code Reviews| Index: ash/utility/partial_screenshot_controller.cc |
| diff --git a/ash/utility/partial_screenshot_controller.cc b/ash/utility/partial_screenshot_controller.cc |
| index f2406d99abd91fee0bc57536e4ca6839928ed050..2b54d723aa1e7cea6e1f2522d19aef3e898e8975 100644 |
| --- a/ash/utility/partial_screenshot_controller.cc |
| +++ b/ash/utility/partial_screenshot_controller.cc |
| @@ -95,10 +95,15 @@ class PartialScreenshotController::ScopedCursorSetter { |
| gfx::NativeCursor original_cursor = cursor_manager->GetCursor(); |
| cursor_manager_ = cursor_manager; |
| cursor_manager_->SetCursor(cursor); |
| + bool was_visible = cursor_manager_->IsCursorVisible(); |
| + if (!was_visible) |
| + cursor_manager_->ShowCursor(); |
| cursor_manager_->LockCursor(); |
| - // SetCursor does not make any effects at this point but it sets back to the |
| - // original cursor when unlocked. |
| + // SetCursor/HideCursor do not make any effects at this point |
| + // but it sets back to the original cursor state when unlocked. |
| cursor_manager_->SetCursor(original_cursor); |
| + if (!was_visible) |
| + cursor_manager_->HideCursor(); |
|
Jun Mukai
2015/05/14 22:49:10
Does it have to hide the cursor again?
When cursor
oshima
2015/05/14 23:15:55
I was thinking "shift-ctrl-f5 then esc" scenario,
|
| } |
| ~ScopedCursorSetter() { |