Moving window between displays should restore bounds if user hasn't explicitly changed bounds |
|||||
Issue descriptionwindow 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.
,
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
,
Dec 1 2017
,
Dec 4 2017
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.
,
Dec 4 2017
Approving merge to M64 Chrome OS.
,
Dec 4 2017
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 |
|||||
Comment 1 by warx@chromium.org
, Nov 14 2017