Chromium Code Reviews| 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..334477fd541b647136910db4007b0cccc812afbe 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,19 @@ gfx::Point AuraWindowCaptureMachine::UpdateCursorState( |
| return gfx::Point(); |
| } |
| + // Return early if the target content pointed by the mouse is hidden. |
| + aura::client::ActivationClient* activation_client = |
| + aura::client::GetActivationClient(desktop_window_->GetRootWindow()); |
| + DCHECK(activation_client); |
| + aura::Window* active_window = activation_client->GetActiveWindow(); |
| + DCHECK(active_window); |
| + if (active_window != desktop_window_) { |
| + if (active_window->GetBoundsInScreen().Contains(cursor_position)) { |
|
miu
2015/10/19 19:49:47
This mostly works. It wouldn't if there were TWO
xjz
2015/10/20 00:03:21
Done.
|
| + ClearCursorState(); |
| + return gfx::Point(); |
| + } |
| + } |
| + |
| gfx::NativeCursor cursor = desktop_window_->GetHost()->last_cursor(); |
| gfx::Point cursor_hot_point; |
| if (last_cursor_ != cursor || |