| Index: ash/wm/panels/panel_window_resizer.cc
|
| diff --git a/ash/wm/panels/panel_window_resizer.cc b/ash/wm/panels/panel_window_resizer.cc
|
| index 8c35abcc82ba36f8108460f103923b2c0ac13405..1c054b4c36f20c00128ae0d763a53588d1e62589 100644
|
| --- a/ash/wm/panels/panel_window_resizer.cc
|
| +++ b/ash/wm/panels/panel_window_resizer.cc
|
| @@ -6,7 +6,6 @@
|
|
|
| #include "ash/display/display_controller.h"
|
| #include "ash/launcher/launcher.h"
|
| -#include "ash/root_window_controller.h"
|
| #include "ash/screen_ash.h"
|
| #include "ash/shelf/shelf_types.h"
|
| #include "ash/shelf/shelf_widget.h"
|
| @@ -58,6 +57,8 @@ PanelWindowResizer::Create(WindowResizer* next_window_resizer,
|
| }
|
|
|
| void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) {
|
| + last_location_ = location;
|
| + wm::ConvertPointToScreen(GetTarget()->parent(), &last_location_);
|
| bool destroyed = false;
|
| if (!did_move_or_resize_) {
|
| did_move_or_resize_ = true;
|
| @@ -125,6 +126,10 @@ aura::Window* PanelWindowResizer::GetTarget() {
|
| return next_window_resizer_->GetTarget();
|
| }
|
|
|
| +const gfx::Point& PanelWindowResizer::GetInitialLocation() const {
|
| + return details_.initial_location_in_parent;
|
| +}
|
| +
|
| PanelWindowResizer::PanelWindowResizer(WindowResizer* next_window_resizer,
|
| const Details& details)
|
| : details_(details),
|
| @@ -205,9 +210,9 @@ void PanelWindowResizer::FinishDragging() {
|
| if (GetTarget()->GetProperty(internal::kPanelAttachedKey) !=
|
| should_attach_) {
|
| GetTarget()->SetProperty(internal::kPanelAttachedKey, should_attach_);
|
| - GetTarget()->SetDefaultParentByRootWindow(
|
| - GetTarget()->GetRootWindow(),
|
| - GetTarget()->GetBoundsInScreen());
|
| + gfx::Rect near_last_location(last_location_, gfx::Size());
|
| + GetTarget()->SetDefaultParentByRootWindow(GetTarget()->GetRootWindow(),
|
| + near_last_location);
|
| }
|
| if (panel_container_)
|
| GetPanelLayoutManager(panel_container_)->FinishDragging();
|
|
|