summaryrefslogtreecommitdiffstats
path: root/ui/aura_shell/launcher
diff options
context:
space:
mode:
Diffstat (limited to 'ui/aura_shell/launcher')
-rw-r--r--ui/aura_shell/launcher/launcher_view.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/aura_shell/launcher/launcher_view.cc b/ui/aura_shell/launcher/launcher_view.cc
index 4bc81c5..c685ae1 100644
--- a/ui/aura_shell/launcher/launcher_view.cc
+++ b/ui/aura_shell/launcher/launcher_view.cc
@@ -8,6 +8,7 @@
#include "ui/aura/desktop.h"
#include "ui/aura_shell/aura_shell_export.h"
#include "ui/aura_shell/launcher/launcher_button.h"
+#include "ui/aura_shell/shell_window_ids.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/compositor/layer.h"
#include "views/widget/widget.h"
@@ -36,13 +37,15 @@ void LauncherView::ButtonPressed(views::Button* sender,
const views::Event& event) {
}
-AURA_SHELL_EXPORT views::Widget* CreateLauncher() {
+views::Widget* CreateLauncher() {
views::Widget* launcher_widget = new views::Widget;
- views::Widget::InitParams params2(views::Widget::InitParams::TYPE_CONTROL);
- params2.bounds = gfx::Rect(0, 0, 300, 64);
+ views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
+ params.bounds = gfx::Rect(0, 0, 300, 64);
+ params.parent = aura::Desktop::GetInstance()->window()->GetChildById(
+ aura_shell::internal::kShellWindowId_LauncherContainer);
LauncherView* launcher_view = new LauncherView;
- params2.delegate = launcher_view;
- launcher_widget->Init(params2);
+ params.delegate = launcher_view;
+ launcher_widget->Init(params);
launcher_widget->GetNativeWindow()->layer()->SetOpacity(0.2f);
launcher_widget->SetContentsView(launcher_view);
launcher_widget->Show();