diff options
author | qiangchen <qiangchen@chromium.org> | 2015-12-16 11:56:56 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-16 19:58:01 +0000 |
commit | 65a833af01fe7588e76e18cd28a86aec8980389d (patch) | |
tree | 48ddf8a71d8d5ddd9197b30dbac3a96aebdf305b /content/browser/media/capture/cursor_renderer_aura.cc | |
parent | 8ad3904bae922cf821e3a565d84d8f671d2855c0 (diff) | |
download | chromium_src-65a833af01fe7588e76e18cd28a86aec8980389d.zip chromium_src-65a833af01fe7588e76e18cd28a86aec8980389d.tar.gz chromium_src-65a833af01fe7588e76e18cd28a86aec8980389d.tar.bz2 |
Bug fix: Show mouse cursor during full screen share on ChromeOS.
For R48, On chrome book we found when doing screen share of the
whole screen, the mouse cursor was not captured. This is caused by a bug
we consider the root window as inactive. In this CL, we fix this bug,
and then mouse cursor is shared when doing full screen share.
BUG=568841
Review URL: https://codereview.chromium.org/1527603005
Cr-Commit-Position: refs/heads/master@{#365594}
Diffstat (limited to 'content/browser/media/capture/cursor_renderer_aura.cc')
-rw-r--r-- | content/browser/media/capture/cursor_renderer_aura.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/content/browser/media/capture/cursor_renderer_aura.cc b/content/browser/media/capture/cursor_renderer_aura.cc index 68d743a..a2b4e1b 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(); |