Chromium Code Reviews| Index: views/widget/widget.cc |
| diff --git a/views/widget/widget.cc b/views/widget/widget.cc |
| index e108e843586e5ca30d16dff975a0a4902bb7f17a..9c5060b9872a0b0a96b7f41af82b49b693bcc7fd 100644 |
| --- a/views/widget/widget.cc |
| +++ b/views/widget/widget.cc |
| @@ -73,7 +73,8 @@ class DefaultWidgetDelegate : public WidgetDelegate { |
| public: |
| DefaultWidgetDelegate(Widget* widget, const Widget::InitParams& params) |
| : widget_(widget), |
| - can_activate_(params.type != Widget::InitParams::TYPE_POPUP) { |
| + can_activate_(!params.child && |
| + params.type != Widget::InitParams::TYPE_POPUP) { |
| } |
| virtual ~DefaultWidgetDelegate() {} |
| @@ -398,6 +399,8 @@ const Widget* Widget::GetTopLevelWidget() const { |
| void Widget::SetContentsView(View* view) { |
| root_view_->SetContentsView(view); |
| + if (non_client_view_ != view) |
| + non_client_view_ = NULL; |
|
sadrul
2011/09/22 22:12:04
If this is necessary only for tests, can there be
oshima
2011/09/22 22:27:05
This is a bug which has to be fixed in normal case
|
| } |
| View* Widget::GetContentsView() { |
| @@ -1074,6 +1077,7 @@ internal::RootView* Widget::CreateRootView() { |
| } |
| void Widget::DestroyRootView() { |
| + non_client_view_ = NULL; |
| root_view_.reset(); |
| // Input method has to be destroyed before focus manager. |
| input_method_.reset(); |