Chromium Code Reviews| 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 68d743a149dfaa030be792f65a75aed4c4652016..3fd306c48eb96e576ccb9766c8bf2dd29a334487 100644 |
| --- a/content/browser/media/capture/cursor_renderer_aura.cc |
| +++ b/content/browser/media/capture/cursor_renderer_aura.cc |
| @@ -76,15 +76,19 @@ 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; |
| + // No need to check whether the root window, namely the screen is active or |
| + // not. |
|
Sergey Ulanov
2015/12/16 01:43:36
Please reword this to make it clear what's going o
qiangchen
2015/12/16 17:30:05
Done.
|
| + if (!window_->IsRootWindow()){ |
|
Sergey Ulanov
2015/12/16 01:43:36
formatting: need a space before {
qiangchen
2015/12/16 17:30:05
Done.
|
| + 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(); |