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

Issue 785017 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 778438



Sign in to add a comment

Moving window between displays should restore bounds if user hasn't explicitly changed bounds

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

Issue description

window bounds maybe changed after a window moved to another display area. When moving back, and user hasn't explicitly changed bounds, window bounds should be restored as original bounds.
 

Comment 1 by warx@chromium.org, Nov 14 2017

Blocking: 778438
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 1 2017

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

commit 76107e3c3cd111e2f9116a187ecbb5217eb273a9
Author: Qiang Xu <warx@chromium.org>
Date: Fri Dec 01 21:06:24 2017

cros: Using original-not-changed-by-user bounds when added to workspace

changes:
When window is added to a workspace from another workspace, its current
window bounds possibly is not the original-not-changed-by-user bounds,
for example a resized bounds truncated by available workarea.

Using a member in ash::wm::WindowState to store the windows bounds. It
is used in window added to workspace event from another workspace. It is
set when window is removing from a workspace and it is nullptr (using
pre_auto_manage_window_bounds() if it exists otherwise current window bounds).
It gets reset when window bounds is changed by user.

DisplayMoveWindowUtilTest.KeepWindowBoundsIfNotChangedByUser, also
tested on emulator. Not-user-resized window bounds will not affect the
original bounds when moving between displays.

Bug:  785017 ,  778438 
Test: added the test coverage in
Change-Id: I37d2c79238ea7200b32b5e3a9d5064addc575976
Reviewed-on: https://chromium-review.googlesource.com/770891
Commit-Queue: Qiang(Joe) Xu <warx@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521063}
[modify] https://crrev.com/76107e3c3cd111e2f9116a187ecbb5217eb273a9/ash/display/display_move_window_util_unittest.cc
[modify] https://crrev.com/76107e3c3cd111e2f9116a187ecbb5217eb273a9/ash/wm/default_state.cc
[modify] https://crrev.com/76107e3c3cd111e2f9116a187ecbb5217eb273a9/ash/wm/window_positioner.cc
[modify] https://crrev.com/76107e3c3cd111e2f9116a187ecbb5217eb273a9/ash/wm/window_state.cc
[modify] https://crrev.com/76107e3c3cd111e2f9116a187ecbb5217eb273a9/ash/wm/window_state.h
[modify] https://crrev.com/76107e3c3cd111e2f9116a187ecbb5217eb273a9/ash/wm/workspace/workspace_layout_manager.cc

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

Status: Fixed (was: Assigned)

Comment 4 by warx@chromium.org, Dec 4 2017

Labels: Merge-Request-64
CL is landed in m65. Though this bug is not critical, I am still considering merging it back to make no merging conflict for following CLs.
Labels: -Merge-Request-64 Merge-Approved-64
Approving merge to M64 Chrome OS.
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 4 2017

Labels: -merge-approved-64 merge-merged-3280
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8984cfa6f565570404c47d2cae23036166f1da0c

commit 8984cfa6f565570404c47d2cae23036166f1da0c
Author: Qiang Xu <warx@chromium.org>
Date: Mon Dec 04 21:59:36 2017

m64 merge: cros: Using original-not-changed-by-user bounds when added to workspace

changes:
When window is added to a workspace from another workspace, its current
window bounds possibly is not the original-not-changed-by-user bounds,
for example a resized bounds truncated by available workarea.

Using a member in ash::wm::WindowState to store the windows bounds. It
is used in window added to workspace event from another workspace. It is
set when window is removing from a workspace and it is nullptr (using
pre_auto_manage_window_bounds() if it exists otherwise current window bounds).
It gets reset when window bounds is changed by user.

DisplayMoveWindowUtilTest.KeepWindowBoundsIfNotChangedByUser, also
tested on emulator. Not-user-resized window bounds will not affect the
original bounds when moving between displays.

TBR=oshima@chromium.org

(cherry picked from commit 76107e3c3cd111e2f9116a187ecbb5217eb273a9)

Bug:  785017 ,  778438 
Test: added the test coverage in
Change-Id: I37d2c79238ea7200b32b5e3a9d5064addc575976
Reviewed-on: https://chromium-review.googlesource.com/770891
Commit-Queue: Qiang(Joe) Xu <warx@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#521063}
Reviewed-on: https://chromium-review.googlesource.com/807206
Reviewed-by: Qiang(Joe) Xu <warx@chromium.org>
Cr-Commit-Position: refs/branch-heads/3280@{#8}
Cr-Branched-From: 12d6a1a2daf69e7fed839a65b0d1284021056b6a-refs/heads/master@{#519958}
[modify] https://crrev.com/8984cfa6f565570404c47d2cae23036166f1da0c/ash/display/display_move_window_util_unittest.cc
[modify] https://crrev.com/8984cfa6f565570404c47d2cae23036166f1da0c/ash/wm/default_state.cc
[modify] https://crrev.com/8984cfa6f565570404c47d2cae23036166f1da0c/ash/wm/window_positioner.cc
[modify] https://crrev.com/8984cfa6f565570404c47d2cae23036166f1da0c/ash/wm/window_state.cc
[modify] https://crrev.com/8984cfa6f565570404c47d2cae23036166f1da0c/ash/wm/window_state.h
[modify] https://crrev.com/8984cfa6f565570404c47d2cae23036166f1da0c/ash/wm/workspace/workspace_layout_manager.cc

Sign in to add a comment