New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 783589 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 778438



Sign in to add a comment

snapped window bounds is not updated when moving to another display

Project Member Reported by warx@chromium.org, Nov 10 2017

Issue description

How 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.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e47fa792900b2ff16fd7324a26a0295627af4a3

commit 5e47fa792900b2ff16fd7324a26a0295627af4a3
Author: Qiang Xu <warx@chromium.org>
Date: Thu Nov 30 21:22:22 2017

cros: add multi window resizer test for two snapped windows

changes:
Add test coverage for multi window resizer dragging to change bounds of
two snapped windows. Also in file cleanup.

Bug:  783589 
Test: covered by tests.
Change-Id: I1ce5e5d4aa762c55a5a5933be452ce3fb4c7b1fa
Reviewed-on: https://chromium-review.googlesource.com/799810
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Qiang(Joe) Xu <warx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520691}
[modify] https://crrev.com/5e47fa792900b2ff16fd7324a26a0295627af4a3/ash/wm/workspace/multi_window_resize_controller_unittest.cc
[modify] https://crrev.com/5e47fa792900b2ff16fd7324a26a0295627af4a3/testing/buildbot/filters/ash_unittests_mash.filter

Project Member

Comment 2 by bugdroid1@chromium.org, 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

Comment 3 by warx@chromium.org, Dec 8 2017

Status: Fixed (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, 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