snapped window bounds is not updated when moving to another display |
||
Issue descriptionHow to repro: Two displays: one with width 400px, the other's width 800px. Move window to another display by shortcuts will keep the bounds, keep the window state (snapped), but window bounds is not updated to snapped bounds of new display. Root cause: In DefaultState::HandleWorkspaceEvents WM_EVENT_ADDED_TO_WORKSPACE: window_state->AdjustSnappedBounds doesn't do set_width.
,
Dec 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/81e2da8acdd54eeb8a4485133561c67f1aba5f65 commit 81e2da8acdd54eeb8a4485133561c67f1aba5f65 Author: Qiang Xu <warx@chromium.org> Date: Fri Dec 08 20:54:01 2017 cros: keep snapped window width ratio against display workarea width changes: - Keep snapped window width ratio against display workarea width. The ratio is updated on (1) snapped state entered (2) bounds event upon snapped state. The ratio is applied on adjusting snapped bounds. - WindowStateTest.UpdateSnapWidthRatioTest to test above change. - Add test coverage for crbug.com/688583 . - added test coverage for moving (maximized/fullscreen/snapped) window to another display. Bug: 783589 , 778438 , 688583 Test: emulator test and added test coverage Change-Id: Ibbc3afea87342e75c591c23ecd3a4fded5254cff Reviewed-on: https://chromium-review.googlesource.com/764114 Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Reviewed-by: Robert Flack <flackr@chromium.org> Commit-Queue: Qiang(Joe) Xu <warx@chromium.org> Cr-Commit-Position: refs/heads/master@{#522869} [modify] https://crrev.com/81e2da8acdd54eeb8a4485133561c67f1aba5f65/ash/display/display_move_window_util_unittest.cc [modify] https://crrev.com/81e2da8acdd54eeb8a4485133561c67f1aba5f65/ash/wm/default_state.cc [modify] https://crrev.com/81e2da8acdd54eeb8a4485133561c67f1aba5f65/ash/wm/window_state.cc [modify] https://crrev.com/81e2da8acdd54eeb8a4485133561c67f1aba5f65/ash/wm/window_state.h [modify] https://crrev.com/81e2da8acdd54eeb8a4485133561c67f1aba5f65/ash/wm/window_state_unittest.cc [modify] https://crrev.com/81e2da8acdd54eeb8a4485133561c67f1aba5f65/ash/wm/workspace/multi_window_resize_controller_unittest.cc [modify] https://crrev.com/81e2da8acdd54eeb8a4485133561c67f1aba5f65/ash/wm/workspace/workspace_layout_manager_unittest.cc
,
Dec 8 2017
,
Jan 11 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/44e2e68a231e2f35b4d24cdf5055a162cd241734 commit 44e2e68a231e2f35b4d24cdf5055a162cd241734 Author: Qiang Xu <warx@chromium.org> Date: Thu Jan 11 01:02:56 2018 cros: base::Optional for snapped_width_ratio_ changes: Two advantages for this change: (1) we don't need to set initial value for snapped_width_ratio_; (2) snapped_width_ratio_ is NULL when not snapped. It makes more sense. Bug: 783589 Test: covered by tests Change-Id: I1d76fdae7c23466d58ea80af7f8590ac1004b874 Reviewed-on: https://chromium-review.googlesource.com/859739 Reviewed-by: Mitsuru Oshima <oshima@chromium.org> Commit-Queue: Qiang(Joe) Xu <warx@chromium.org> Cr-Commit-Position: refs/heads/master@{#528513} [modify] https://crrev.com/44e2e68a231e2f35b4d24cdf5055a162cd241734/ash/display/display_move_window_util_unittest.cc [modify] https://crrev.com/44e2e68a231e2f35b4d24cdf5055a162cd241734/ash/wm/window_state.cc [modify] https://crrev.com/44e2e68a231e2f35b4d24cdf5055a162cd241734/ash/wm/window_state.h [modify] https://crrev.com/44e2e68a231e2f35b4d24cdf5055a162cd241734/ash/wm/window_state_unittest.cc [modify] https://crrev.com/44e2e68a231e2f35b4d24cdf5055a162cd241734/ash/wm/workspace/multi_window_resize_controller_unittest.cc |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Nov 30 2017