Postpone ATK window activated events until AT-SPI is ready.
AT-SPI sets up a number of ATK event listeners. If Chromium emits events too early, they won't be detected by AT-SPI. The initialization of AT-SPI listeners happens at spi_atk_register_event_listeners in the at-spi2-atk library. It also sets up a key event listener, which is registered by Chromium at AtkUtilAuraLinuxAddKeyEventListener. We use the registration of the key event listener as an indication of AT-SPI being ready, due to our internal knowledge of the internals of the AT-SPI/ATK bridge. If there are no key event listeners, we consider AT-SPI is not ready, so window activated events are queued. As soon as a key event listener is registered, events will be run and never queued again. A window deactivated event would cancel the queued activated event. Bug: 1062755 Change-Id: I2d1a1516bed2b8437df664d69399b72af02eb4a8 AX-Relnotes: Linux: send Chromium's first window activation event. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2312818Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Jacobo Aragunde Pérez <jaragunde@igalia.com> Cr-Commit-Position: refs/heads/master@{#800502}
Showing
Please register or sign in to comment