Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure HideCursor is called when touch events are handled
It's possible for the mouse cursor to get wedged into the hidden state if the cursor is hidden when the CursorManager is destroyed (i.e. all toplevel windows are closed). When a background extension is installed the process/thread sticks around until a new browser window is launched. The process-static CursorManager::last_cursor_visibility_state_ is used to seed the initial visibility state of the cursor of the new CursorManager that is created along with the new browser window. However last_cursor_visibility_state_ does not currently get set to false when the cursor is hidden due to processing touch events (there are no calls to HideCursor). This change adds a call to SetCursorVisibilityOnEvent(false) when processing touch pressed events, to keep this variable in sync with reality. When the new browser window is launched, it correctly initializes the cursor state so that subsequent mouse moves will actually show the cursor. R=sadrul@chromium.org Bug: 795566 Change-Id: I501083f6898fab863e34625cac468a8701a575f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2223990 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Daniel Libby <dlibby@microsoft.com> Cr-Commit-Position: refs/heads/master@{#773618}
- Loading branch information