exo: UpdateCursor when focus surface changes
In exo::Pointer, SetCursorType provides system wide cursor shape change while UpdateCursor updates the cursor per Widget. Because of that, by followng the steps below, we can cause a glitch. In order to prevent that, we should call UpdateCursor at the end of SetFocus. 1. Initially, the cursor is normal on both windows. Window #1: cursor kPointer(focused), Window #2: cursor kPointer Shown cursor: kPointer 2. ARC calls SetCursorType(kNone). Window #1: cursor kNone(focused), Window #2: cursor kPointer Shown cursor: kNone 3. Press Alt-Tab to focus Window #2. ARC calls SetCursorType(kPointer). Window #1: cursor kNone, Window #2: cursor kPointer (focused) Shown cursor: kPointer 4. Move the cursor to the location in Window #1. ARC thinks it should be kPointer, but SetCursorType is not called as it's already called. As a result, kNone is shown although kPointer should be shown. Window #1: cursor kNone, Window #2: cursor kPointer (focused) Shown cursor: kNone TEST=manual(Follow the repro steps in #2 of the bug) BUG=b:132095671 Change-Id: Iea860a0f2099b6b1d5d20dc8483ec1ae975792bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1885130Reviewed-by:Mitsuru Oshima <oshima@chromium.org> Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org> Cr-Commit-Position: refs/heads/master@{#711496}
Showing
Please register or sign in to comment