Index: ash/wm/dock/docked_window_resizer.cc |
diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc |
index fc880d76a27dab0e94a0a3be2223706220a47f54..224adb641530c2923616fa990c91b887d07af25a 100644 |
--- a/ash/wm/dock/docked_window_resizer.cc |
+++ b/ash/wm/dock/docked_window_resizer.cc |
@@ -174,7 +174,7 @@ bool DockedWindowResizer::MaybeSnapToEdge(const gfx::Rect& bounds, |
(dock_alignment == internal::DOCKED_ALIGNMENT_NONE && was_docked_)) { |
const int distance = bounds.x() - dock_bounds.x(); |
if (distance < kSnapToDockDistance && distance > -kStickyDistance) { |
- offset->set_x(dock_bounds.x() - bounds.x()); |
+ offset->set_x(-distance); |
return true; |
} |
} |
@@ -182,7 +182,7 @@ bool DockedWindowResizer::MaybeSnapToEdge(const gfx::Rect& bounds, |
(dock_alignment == internal::DOCKED_ALIGNMENT_NONE && was_docked_)) { |
const int distance = dock_bounds.right() - bounds.right(); |
if (distance < kSnapToDockDistance && distance > -kStickyDistance) { |
- offset->set_x(dock_bounds.right() - bounds.right()); |
+ offset->set_x(distance); |
return true; |
} |
} |
@@ -213,6 +213,10 @@ void DockedWindowResizer::FinishDragging() { |
if (should_dock != |
(window->parent()->id() == internal::kShellWindowId_DockedContainer)) { |
if (should_dock) { |
+ // Panel resizer might have attached this to the launcher. |
+ // Docked resizer takes priority and may attach it to the docked area. |
+ if (window->type() == aura::client::WINDOW_TYPE_PANEL) |
+ window->SetProperty(internal::kPanelAttachedKey, false); |
flackr
2013/07/16 22:05:45
Separate CL please.
varkha
2013/07/18 21:56:59
Done.
|
aura::Window* dock_container = Shell::GetContainer( |
window->GetRootWindow(), |
internal::kShellWindowId_DockedContainer); |