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

Unified Diff: ui/aura/dispatcher_linux.cc

Issue 9837046: Revert r128507 "Revert r128436 "relanding: disabled workspace_window_resizer test. fixed access-aft… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « ui/aura/aura.gyp ('k') | ui/aura/env.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/dispatcher_linux.cc
diff --git a/ui/aura/dispatcher_linux.cc b/ui/aura/dispatcher_linux.cc
index 9603d118ba06e4f3568c5e96d0be5f7dc6318956..8fbf7f401118900493042d936259c4be7bf55505 100644
--- a/ui/aura/dispatcher_linux.cc
+++ b/ui/aura/dispatcher_linux.cc
@@ -23,12 +23,15 @@ void DispatcherLinux::RootWindowHostCreated(::Window window,
::Window root,
RootWindowHostLinux* host) {
hosts_.insert(std::make_pair(window, host));
- hosts_.insert(std::make_pair(root, host));
+ // Only the 1st root window listens to the root window.
+ if (hosts_.find(root) == hosts_.end())
+ hosts_.insert(std::make_pair(root, host));
}
void DispatcherLinux::RootWindowHostDestroying(::Window window, ::Window root) {
+ if (hosts_[window] == hosts_[root])
+ hosts_.erase(root);
hosts_.erase(window);
- hosts_.erase(root);
}
base::MessagePumpDispatcher::DispatchStatus DispatcherLinux::Dispatch(
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/env.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698