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

Unified Diff: content/browser/media/capture/cursor_renderer_aura.cc

Issue 1538623002: Bug fix: Show mouse cursor during full screen share on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/cursor_renderer_aura.cc
diff --git a/content/browser/media/capture/cursor_renderer_aura.cc b/content/browser/media/capture/cursor_renderer_aura.cc
index f2ce8aee50a37e7ca030d8c564f3b5fa78ad180c..7484a697d4b36a65eca9a5d0dc6ab5826ad08bca 100644
--- a/content/browser/media/capture/cursor_renderer_aura.cc
+++ b/content/browser/media/capture/cursor_renderer_aura.cc
@@ -76,15 +76,20 @@ bool CursorRendererAura::SnapshotCursorState(const gfx::Rect& region_in_frame) {
return false;
}
- aura::client::ActivationClient* activation_client =
- aura::client::GetActivationClient(window_->GetRootWindow());
- DCHECK(activation_client);
- aura::Window* active_window = activation_client->GetActiveWindow();
- if (!active_window->Contains(window_)) {
- // Return early if the target window is not active.
- DVLOG(2) << "Skipping update on an inactive window";
- Clear();
- return false;
+ // If we are sharing the root window, or namely the whole screen, we will
+ // render the mouse cursor. For ordinary window, we only render the mouse
+ // cursor when the window is active.
+ if (!window_->IsRootWindow()) {
+ aura::client::ActivationClient* activation_client =
+ aura::client::GetActivationClient(window_->GetRootWindow());
+ DCHECK(activation_client);
+ aura::Window* active_window = activation_client->GetActiveWindow();
+ if (!active_window->Contains(window_)) {
+ // Return early if the target window is not active.
+ DVLOG(2) << "Skipping update on an inactive window";
+ Clear();
+ return false;
+ }
}
gfx::NativeCursor cursor = window_->GetHost()->last_cursor();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698