Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2064)

Unified Diff: ash/common/wm/default_state.cc

Issue 2538293002: Fix dragging snapped window to another display landing the window in the wrong bounds (Closed)
Patch Set: I just needed to rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/default_state.cc
diff --git a/ash/common/wm/default_state.cc b/ash/common/wm/default_state.cc
index 2b5a5893d21d621e2cbe1f67c7383667f6d6b197..d7e49d9579bb57bb16e98241e359238de9cefeaf 100644
--- a/ash/common/wm/default_state.cc
+++ b/ash/common/wm/default_state.cc
@@ -682,8 +682,13 @@ void DefaultState::UpdateBoundsFromState(WindowState* window_state,
bounds_in_parent = window->GetBounds();
}
// Make sure that part of the window is always visible.
- wm::AdjustBoundsToEnsureMinimumWindowVisibility(work_area_in_parent,
- &bounds_in_parent);
+ if (!window_state->is_dragged()) {
+ // Avoid doing this while the window is being dragged as its root
+ // window hasn't been updated yet in the case of dragging to another
+ // display. crbug.com/666836.
+ wm::AdjustBoundsToEnsureMinimumWindowVisibility(work_area_in_parent,
+ &bounds_in_parent);
+ }
break;
}
case WINDOW_STATE_TYPE_MAXIMIZED:
« no previous file with comments | « no previous file | ash/common/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698