| Index: mojo/examples/window_manager/window_manager.cc
|
| diff --git a/mojo/examples/window_manager/window_manager.cc b/mojo/examples/window_manager/window_manager.cc
|
| index a96becea6e640b0c835265b296afa09e7c10eb60..e812df9e01a9e9e5bf647993f365819169f0d6e8 100644
|
| --- a/mojo/examples/window_manager/window_manager.cc
|
| +++ b/mojo/examples/window_manager/window_manager.cc
|
| @@ -87,8 +87,6 @@ class WindowManager : public Application,
|
| CreateWindow(kEmbeddedAppURL);
|
| else if (event->flags & ui::EF_RIGHT_MOUSE_BUTTON)
|
| CreateWindow(kNestingAppURL);
|
| - else if (event->flags & ui::EF_MIDDLE_MOUSE_BUTTON)
|
| - CreateWindow(kMojoBrowserURL);
|
| }
|
| }
|
|
|
| @@ -106,15 +104,18 @@ class WindowManager : public Application,
|
| node->SetActiveView(view);
|
| view->SetColor(SK_ColorBLUE);
|
| view->AddObserver(this);
|
| +
|
| + CreateWindow(kMojoBrowserURL);
|
| }
|
|
|
| void CreateWindow(const std::string& url) {
|
| Node* node = view_manager_->GetNodeById(parent_node_id_);
|
|
|
| - gfx::Rect bounds(50, 50, 400, 400);
|
| + gfx::Rect bounds(node->bounds().size());
|
| + bounds.Inset(25, 25);
|
| if (!node->children().empty()) {
|
| gfx::Point position = node->children().back()->bounds().origin();
|
| - position.Offset(50, 50);
|
| + position.Offset(25, 25);
|
| bounds.set_origin(position);
|
| }
|
|
|
|
|