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

Unified Diff: ui/snapshot/screenshot_grabber.cc

Issue 2167613003: Hide mouse cursor when screenshot is taking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: show the cursor when screenshot completed Created 4 years, 5 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/snapshot/screenshot_grabber.cc
diff --git a/ui/snapshot/screenshot_grabber.cc b/ui/snapshot/screenshot_grabber.cc
index 4534a857b4beab8a5b77dc15a825a6098b8a508e..069cc5dfe043fc7dce0597e734534a6a5667d4a2 100644
--- a/ui/snapshot/screenshot_grabber.cc
+++ b/ui/snapshot/screenshot_grabber.cc
@@ -24,6 +24,7 @@
#include "ui/snapshot/snapshot.h"
#if defined(USE_AURA)
+#include "ui/aura/client/cursor_client.h"
#include "ui/aura/window.h"
#endif
@@ -134,6 +135,11 @@ void ScreenshotGrabber::TakeScreenshot(gfx::NativeWindow window,
aura::Window* aura_window = static_cast<aura::Window*>(window);
is_partial = rect.size() != aura_window->bounds().size();
window_identifier = aura_window->GetBoundsInScreen().ToString();
+
+ aura::client::CursorClient* cursor_client =
+ aura::client::GetCursorClient(aura_window->GetRootWindow());
+ if (cursor_client)
+ cursor_client->HideCursor();
#endif
ui::GrabWindowSnapshotAsync(
window, rect, blocking_task_runner_,

Powered by Google App Engine
This is Rietveld 408576698