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

Unified Diff: ash/utility/partial_screenshot_controller.cc

Issue 1128933009: Show the cursor if it was hidden when starting partical screenshot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | ash/utility/partial_screenshot_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | ash/utility/partial_screenshot_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698