Filter out stale accessibility events.

This commit is contained in:
Storm Dragon committed 2026-11-04 14:23:54 -05:00
1 parent 9e15f8652d
commit f23e89ed93
10 files changed
+469 -2

No files matched your search

+40
View File
@@ -83,6 +83,46 @@ ready to replace the reader.
Preserve a fresh log if lag or a missing announcement remains, with the time
and the key or update that triggered it. Debug logs can contain private text.
## Foreground GTK table refreshes
A foreground table rebuild can publish stale focus/selected/active-descendant
claims for retired cells and repeat the same container selection event hundreds
of times. The adapter rejects targets already known to be invalid or defunct
before snapshot capture. Unknown metadata follows the existing query path;
focus and selected state alone are not used to reject a live explicit claim.
For GTK tables, repeated selection events from the same container retain one
boxed native event until the next GLib idle turn. The adapter then queries the
current selection. No timer or fixed delay is added. A different table or a
live presentation event flushes the pending selection first. Routine structural
invalidation still runs without forcing a snapshot between every removed row.
Non-GTK controls, browser tabs, menus and multiple-selection target resolution
keep their existing behavior. Lock epochs reject a deferred event from before
a lock transition; reset and shutdown release the pending event and idle source.
```sh
python3 tests/native_test_session.py env XDG_SESSION_TYPE=x11 CTHULHU_NATIVE_TABLE_REFRESH=1 go test -race ./internal/atspi -run '^TestNativeGUITableRefresh$' -count=1 -v -timeout=40s
python3 tests/native_atspi.py --table-only
```
The refresh fixture uses GTK's actual accessibility connection to emit every
obsolete claim, bypassing the ATK bridge's own producer-side compression. It
checks that dead cells never become captured focus/selection events, a burst
does not produce hundreds of selection snapshots, the final selected row is
delivered, subsequent navigation works, and queued table selection cannot
restore the old row after focus moves to an entry. The existing table harness
also covers multiple selected rows, GTK lists exposing the Table interface,
Tab/Shift+Tab focus exit, and recorded row speech.
After reviewing and rebuilding the candidate, listen in FastSMRW while a new
timeline entry arrives. Arrow both directions during and after the update;
confirm the current row is spoken without a long silence or a backlog of old
rows. Open and close Open Links and its link menu, then leave and return to the
timeline. Check another GTK table's ordinary arrows and supported multiple
selection, plus browser tabs and a Qt menu. If using Braille, verify row content
and focus return as well. These live checks remain separate from private tests;
preserve a fresh log and the time of any remaining silence.
## Window frame geometry
GTK can report the window manager's enclosing frame while X11's active client