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

Unified Diff: components/exo/pointer.cc

Issue 2847563003: [M58] exo: Fix multi-display cursor crash (Closed)
Patch Set: Split Created 3 years, 8 months 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 | components/exo/wm_helper_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index 1697f5c34dc76a475f96b2b80b43cf9872e52acc..71c59f7812330b73576ec64d11bad93744718824 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -89,9 +89,8 @@ void Pointer::SetCursor(Surface* surface, const gfx::Point& hotspot) {
}
if (surface_) {
surface_->window()->SetTransform(gfx::Transform());
- WMHelper::GetInstance()
- ->GetContainer(ash::kShellWindowId_MouseCursorContainer)
- ->RemoveChild(surface_->window());
+ if (surface_->window()->parent())
reveman 2017/04/27 15:55:04 How can surface_->window()->parent() be null? Can
Dominik Laskowski 2017/04/27 17:02:05 If the primary display is removed.
+ surface_->window()->parent()->RemoveChild(surface_->window());
surface_->SetSurfaceDelegate(nullptr);
surface_->RemoveSurfaceObserver(this);
}
« no previous file with comments | « no previous file | components/exo/wm_helper_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698