• Qiang Xu's avatar
    cros: Using original-not-changed-by-user bounds when added to workspace · 76107e3c
    Qiang Xu authored
    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: default avatarMitsuru Oshima <oshima@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#521063}
    76107e3c
window_state.cc 19.8 KB