summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/launcher/launcher.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ash/launcher/launcher.cc b/ash/launcher/launcher.cc
index ed956f1..8051fad 100644
--- a/ash/launcher/launcher.cc
+++ b/ash/launcher/launcher.cc
@@ -226,15 +226,16 @@ Launcher::Launcher(aura::Window* window_container,
params.delegate = delegate_view_;
widget_->Init(params);
widget_->GetNativeWindow()->SetName("LauncherWindow");
- gfx::Size pref =
- static_cast<views::View*>(launcher_view_)->GetPreferredSize();
- widget_->SetBounds(gfx::Rect(pref));
// The launcher should not take focus when it is initially shown.
widget_->set_focus_on_creation(false);
widget_->SetContentsView(delegate_view_);
widget_->GetNativeView()->SetName("LauncherView");
widget_->GetNativeView()->SetProperty(internal::kStayInSameRootWindowKey,
true);
+ // SetBounds() has to be called after kStayInSameRootWindowKey is set.
+ gfx::Size pref =
+ static_cast<views::View*>(launcher_view_)->GetPreferredSize();
+ widget_->SetBounds(gfx::Rect(pref));
}
Launcher::~Launcher() {