-
Sammie Quon authored
On reconnection, windows are moved to another display via a call to Window::SetBoundsInScreen, which will add to the correct container on the other display. Windows are currently added (if meets conditions) in the order of the MRU, which means they are added to the new container in that order. Stacking order of a window's children is in order of the indexes, so visually the windows are the opposite of the MRU order. Adding the windows in the reversed order would solve this. On disconnection, windows are squashed onto the primary display and stacked according to the MRU list. The formula is: Find window in MRU list, and after that, the next window with the same parent will be the window stacking on top target. If none is found, stack window at bottom. Attached a video for more context in the bug. Test: manual, PersistentWindowControllerTest.MRUOrderMatchesStacking Bug: 1071246 Change-Id: I10a145081603a505491b4885fd2091aa4ea1c55f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2151180Reviewed-by:
Xiyuan Xia <xiyuan@chromium.org> Reviewed-by:
Ahmed Fakhry <afakhry@chromium.org> Commit-Queue: Sammie Quon <sammiequon@chromium.org> Cr-Commit-Position: refs/heads/master@{#759790}
907f5dc0