desks: Fix crash when touchpad swipe with external monitors.
The crash was because a new screenshot is requested when the current screenshot is about to get scrolled out of bounds. It was using a fixed number threshold, meaning displays that are not the same size could get out of sync easily, leading to a CHECK failure. This CL addresses that by requesting screenshot on all displays if even one of them needs one. Another approach would be change the spacing and threshold to be based on the display width instead of fixed number, but that could be prone to roundoff error which may cause a similar issue. Also noticed visible desk metric was double counting when there are multiple displays. Added a TODO for that one as it is lower priority. Bug: 1154868 Test: manual, added regression test Change-Id: I48f5ef62d3284b710f44a2808f75c95686bc9b3d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2570551 Commit-Queue: Sammie Quon <sammiequon@chromium.org> Reviewed-by:Ahmed Fakhry <afakhry@chromium.org> Cr-Commit-Position: refs/heads/master@{#833993}
Showing
Please register or sign in to comment