Chromium Code Reviews| Index: views/desktop/desktop_window_view.cc |
| diff --git a/views/desktop/desktop_window_view.cc b/views/desktop/desktop_window_view.cc |
| index 3668c25f4e0e5b2d6288f8cc9f4f6c1cf0dac7ca..95aa1598e836e17a2d076632bdf2c76a97b3aa3b 100644 |
| --- a/views/desktop/desktop_window_view.cc |
| +++ b/views/desktop/desktop_window_view.cc |
| @@ -176,8 +176,14 @@ void DesktopWindowView::ViewHierarchyChanged( |
| bool is_add, View* parent, View* child) { |
| if (!is_add && |
| active_native_widget_ && |
| - active_native_widget_->GetView() == child) |
| + active_native_widget_->GetView() == child) { |
| active_native_widget_ = NULL; |
| + } else if (child->GetClassName() == |
| + internal::NativeWidgetView::kViewClassName) { |
| + internal::NativeWidgetView* native_widget_view = |
| + static_cast<internal::NativeWidgetView*>(child); |
| + native_widget_view->GetAssociatedWidget()->AddObserver(this); |
|
sky
2011/08/17 15:49:12
Shouldn't you only do this during an add? And shou
sadrul
2011/08/17 15:54:25
Indeed. I did that in a subsequent CL.
|
| + } |
| } |
| //////////////////////////////////////////////////////////////////////////////// |