Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
splitview: Support asynchronous window state change in auto snapping
This CL improves table split view’s auto snapping to support for clients (e.g. ARC app) which handles window state changes asynchronously. In tablet split view mode, when a snappable window is activated, the window is auto snapped in OnWindowActivated event. This is fine for Chrome windows because its wm is synchronized, but this behavior actually does not take some clients (e.g. ARC app), which handles window state changes asynchronously, into account. For example, when trying to snap a minimzied ARC app from shelf, a visible but minimized window state triggers an implicit un-minimizing by someone like WorkspaceLayoutManager. So when un-minimizing a snappable window, WorkspaceLayoutManager emits a window state restore event before SplitViewController triggers auto snapping on "activated". This causes unexpected window state change because the first restore event causes actually restoring the window state before snapped. Therefore, this CL allow SplitViewController to send a snap request before WorkspaceLayoutManager’s handling and filter out events emitted while the window is in a transitional snapped state. design: go/async-tablet-splitview BUG=b:154752540 TEST=SplitViewControllerTest.AutoSnapFromMinimizedState TEST=ClientControlledStateTest.IgnoreWmEventWhenWindowIsInTransitionalSnappedState Change-Id: I3109d5a7ff8744e6fbc7aabe5274dd9fcbfd1b32 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2287193 Commit-Queue: Toshiki Kikuchi <toshikikikuchi@chromium.org> Reviewed-by: Xiaoqian Dai <xdai@chromium.org> Cr-Commit-Position: refs/heads/master@{#788999}
- Loading branch information