cros: Wait before replacing top of clipboard
Problem Background: Some applications take considerable time before finishing a paste. Also, some applications read the clipboard multiple times per paste. When the user selects an item from CBHistory that is not the first item, we need to take the selected item and put it on the clipboard. Then we create a synthetic paste event. With no delay, we were then replacing the old top of the clipboard. Paste is async and can take some time. This means that we may replace the top of the clipboard before the paste is completed. To avoid this, add a 100ms wait before returning the original item to the top of the clipboard. Bug: 11055737 Change-Id: I2f229ebccc00b8241d22bd0341a8c67eeb0b57ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303450Reviewed-by:Andrew Xu <andrewxu@chromium.org> Commit-Queue: Andrew Xu <andrewxu@chromium.org> Commit-Queue: Alex Newcomer <newcomer@chromium.org> Auto-Submit: Alex Newcomer <newcomer@chromium.org> Cr-Commit-Position: refs/heads/master@{#789165}
Showing
Please register or sign in to comment