Index: ash/common/wm/default_state.cc |
diff --git a/ash/common/wm/default_state.cc b/ash/common/wm/default_state.cc |
index d17253e6a9187f68018c7fd5e483d8015509fa50..8587d76e31ca5be49392ea6c8ba689a0e162a246 100644 |
--- a/ash/common/wm/default_state.cc |
+++ b/ash/common/wm/default_state.cc |
@@ -38,6 +38,10 @@ bool IsMinimizedWindowState(const WindowStateType state_type) { |
state_type == WINDOW_STATE_TYPE_DOCKED_MINIMIZED; |
} |
+bool IsTransient(const WmWindow* window) { |
sky
2017/01/03 22:37:23
Can you inline this? I don't think it's save much.
Qiang(Joe) Xu
2017/01/05 06:32:47
Done.
|
+ return window->GetTransientParent(); |
+} |
+ |
void MoveToDisplayForRestore(WindowState* window_state) { |
if (!window_state->HasRestoreBounds()) |
return; |
@@ -477,8 +481,10 @@ bool DefaultState::ProcessWorkspaceEvents(WindowState* window_state, |
gfx::Rect work_area_in_parent = |
GetDisplayWorkAreaBoundsInParent(window_state->window()); |
gfx::Rect bounds = window_state->window()->GetTargetBounds(); |
- wm::AdjustBoundsToEnsureMinimumWindowVisibility(work_area_in_parent, |
- &bounds); |
+ if (!IsTransient(window_state->window())) { |
+ wm::AdjustBoundsToEnsureMinimumWindowVisibility(work_area_in_parent, |
+ &bounds); |
+ } |
window_state->AdjustSnappedBounds(&bounds); |
if (window_state->window()->GetTargetBounds() != bounds) |
window_state->SetBoundsDirectAnimated(bounds); |