| 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(
|
|
|