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

Unified Diff: views/widget/native_widget_aura.cc

Issue 8414035: Makes DefaultContainerLayoutManager ignore windows with transient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test Created 9 years, 2 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
Index: views/widget/native_widget_aura.cc
diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc
index 6b100b115ac56e21fd22e6b9ce8efc1dd489216b..a485f8d06111403a6a235ea4da9fff5b5f74147e 100644
--- a/views/widget/native_widget_aura.cc
+++ b/views/widget/native_widget_aura.cc
@@ -86,10 +86,12 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
if (params.type == Widget::InitParams::TYPE_CONTROL) {
window_->SetParent(params.GetParent());
} else {
- window_->SetParent(NULL);
+ // Set up the transient child before the window is added. This way the
+ // LayoutManager knows the window has a transient parent.
gfx::NativeView parent = params.GetParent();
if (parent)
parent->AddTransientChild(window_);
+ window_->SetParent(NULL);
}
// TODO(beng): do this some other way.
delegate_->OnNativeWidgetSizeChanged(params.bounds.size());

Powered by Google App Engine
This is Rietveld 408576698