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

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

Issue 1527603005: Bug fix: Show mouse cursor during full screen share on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 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();
« 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