From fe9d2edcd0ca528f1489fdb2df7ba5b9563f5f60 Mon Sep 17 00:00:00 2001 From: "mukai@chromium.org" Date: Tue, 30 Oct 2012 23:27:48 +0000 Subject: SetBounds() after setting kStayInSameRootWindowKey for the launcher. BUG=157999 TEST=login, Alt-F4 to make the external display primary, logout, then login. Make sure the launcher is at the primary external display. Review URL: https://chromiumcodereview.appspot.com/11311009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165059 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/launcher/launcher.cc | 7 ++++--- 1 file 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(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(launcher_view_)->GetPreferredSize(); + widget_->SetBounds(gfx::Rect(pref)); } Launcher::~Launcher() { -- cgit v1.1