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

Unified Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2596723002: mus: Unset the cursor client during teardown. (Closed)
Patch Set: - Created 4 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 | ui/views/mus/desktop_window_tree_host_mus_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/desktop_window_tree_host_mus.cc
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index c3097bd499666b4fe677a99dc499a001b7568652..8b131ee80c154ac3f8e09667fc64d36b90d69af3 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -190,6 +190,10 @@ DesktopWindowTreeHostMus::DesktopWindowTreeHostMus(
}
DesktopWindowTreeHostMus::~DesktopWindowTreeHostMus() {
+ // The cursor-client can be accessed during WindowTreeHostMus tear-down. So
+ // the cursor-client needs to be unset on the root-window before
+ // |cursor_manager_| is destroyed.
+ aura::client::SetCursorClient(window(), nullptr);
MusClient::Get()->RemoveObserver(this);
aura::Env::GetInstance()->RemoveObserver(this);
desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this);
« no previous file with comments | « no previous file | ui/views/mus/desktop_window_tree_host_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698