• Sammie Quon's avatar
    tablet: Fix double shelf when entering guest mode. · b1af29a5
    Sammie Quon authored
    The issue was the window was created on startup, then OnGetSwitchStates
    triggers TabletMode to start and create the screenshot since it detects
    a window animating. But the window doesn't destroy the screenshot because
    a |fps_counter_| is not detected on animation end because it is created
    in on animation schedules which happened before entering tablet mode.
    
    This CL aims to prevent this and similar bugs by not taking the screenshot
    if a window is already animating, so the only observed animation is the
    one triggered by entering tablet mode. This may have missed data or
    performance in some cases, but will prevent similar bugs.
    
    Test: ash_unittests TabletModeControllerScreenshotTest.EnterTabletModeWhileAnimating
    Bug: 1035356
    Change-Id: I601d08ef50f214dbd262e5eea6baed40e5596270
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1999241
    Commit-Queue: Sammie Quon <sammiequon@chromium.org>
    Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#732159}
    b1af29a5
tablet_mode_controller.cc 42.4 KB