| Index: content/browser/media/capture/aura_window_capture_machine.cc
|
| diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc
|
| index 9d2de8880746d9a3d29d56c2d791c391f5264d2f..e5019f7d2af1a9a36d62a3c69ae57da733cf2c43 100644
|
| --- a/content/browser/media/capture/aura_window_capture_machine.cc
|
| +++ b/content/browser/media/capture/aura_window_capture_machine.cc
|
| @@ -30,6 +30,7 @@
|
| #include "ui/compositor/dip_util.h"
|
| #include "ui/compositor/layer.h"
|
| #include "ui/gfx/screen.h"
|
| +#include "ui/wm/public/activation_client.h"
|
|
|
| namespace content {
|
|
|
| @@ -413,6 +414,16 @@ gfx::Point AuraWindowCaptureMachine::UpdateCursorState(
|
| return gfx::Point();
|
| }
|
|
|
| + aura::client::ActivationClient* activation_client =
|
| + aura::client::GetActivationClient(desktop_window_->GetRootWindow());
|
| + DCHECK(activation_client);
|
| + aura::Window* active_window = activation_client->GetActiveWindow();
|
| + if (!desktop_window_->Contains(active_window)) {
|
| + // Return early if the target window is not active.
|
| + ClearCursorState();
|
| + return gfx::Point();
|
| + }
|
| +
|
| gfx::NativeCursor cursor = desktop_window_->GetHost()->last_cursor();
|
| gfx::Point cursor_hot_point;
|
| if (last_cursor_ != cursor ||
|
|
|