More work on cthulhu recognizing focused items that should be read.

This commit is contained in:
Storm Dragon committed 2026-11-01 18:31:58 -05:00
1 parent 9374b5a2e5
commit 300f4a7504
9 files changed
+456 -9

No files matched your search

+7 -4
View File
@@ -5,8 +5,10 @@ selected descendants or capturing their text, values, attributes and geometry.
The native adapter owns this decision on the GLib thread. It uses the existing
foreground window and epoch; there is no additional window ownership cache.
Events from another provider can be rejected using copied bus identities and
libatspi's cached role and application name, without querying that provider.
Events from another provider first resolve their containing window: GTK socket
children can belong to the foreground host while using a different provider
bus. Unrelated providers are then rejected using the resolved window and copied
bus identities, before any content queries.
Events from another window on the same provider undergo the existing window
correlation before content capture. Lifecycle invalidation still runs, but a
background provider no longer clears another provider's cached document lines.
@@ -16,8 +18,9 @@ their existing handling. Announcement events are explicit requests to speak
and also bypass the filter; see [announcements](announcements.md). Native alerts, notification daemons and supported
Steam toasts retain their notification paths. Menu popups retain existing
foreground checks. Verified active/showing `mate-panel` menu windows may pass
across provider boundaries, including over an empty desktop; ordinary panel
controls and hidden menus remain filtered. See [MATE desktop](mate-desktop.md).
across provider boundaries, including over an empty desktop. Embedded panel
controls use their host's normal X11 correlation; unrelated panel windows and
hidden menus remain filtered. See [MATE desktop](mate-desktop.md).
Same-provider autocomplete relations and tooltip candidates
continue through the existing event-loop ownership checks; they do not acquire
focus merely by passing the early filter.
+34
View File
@@ -18,6 +18,7 @@ Reviewed the local `orca/` checkout at revision `a8a851800`:
| Marco window cycling | `script_manager.py`, `scripts/switcher/script.py`, `scripts/switcher/script_utilities.py` | Already implemented; see [window switcher checks](window-switcher.md). |
| MATE notification daemon | `script_manager.py`, `scripts/apps/notification-daemon/script.py` | Already routed through notification capture, speech, Braille and history; added an explicit MATE daemon regression. |
| Unnamed panel icons | `generator.py:_generate_accessible_name` | Adapted the containing panel's name/description when the icon supplies neither. Own names and descriptions retain precedence. |
| Embedded panel applets | `script_utilities.py:frame_and_dialog`, `script_utilities.py:top_level_object`, `scripts/default.py:_on_focused_changed` | Follow the accessible parent chain through a GTK plug/socket to its host window before normal foreground validation. |
Orca has no dedicated `mate-panel` script in this checkout. Its current app
script catalog also contains no Caja, Pluma, Atril, Engrampa or Eye of MATE
@@ -39,10 +40,32 @@ hidden menu items retain normal filtering. Native actions and review use the
same window validation. The correlated X11 application is preserved; no popup
cache, native references, timer or extra window owner is introduced.
## Embedded applet ownership
The newer `kendell/mate.log`, recorded with revision `702894ee`, shows a
different failure: Bottom Panel controls are accepted, but focused icons from
other provider buses are rejected as outside the X11 foreground. The reader
announces the host's generic "panel" while discarding the embedded icon.
A real GTK socket/plug reproduction exposes the same structure. The applet
publishes its own frame, whose accessible parent chain crosses the socket's
provider and reaches the panel frame. Window resolution now follows that chain
to the host instead of stopping at the plug frame. The background filter also
resolves this window before rejecting a different provider bus. The source
object retains its own bus, path and process identity for focus and actions.
This is shared window ancestry handling: it requires no MATE process-name
exception. Normal X11 process, state and geometry checks still apply to the
host. Same-provider nested frames retain their existing nearest-window
behavior. An unembedded or detached applet cannot borrow the host's identity,
and a background host cannot admit applet focus. Parent links beyond the plug
frame are refreshed on the GLib owner; no embedding cache is retained.
## Automated checks
```sh
python3 tests/native_test_session.py env CTHULHU_NATIVE_PANEL_MENU=1 CTHULHU_NATIVE_WINDOW_SWITCHER=1 CTHULHU_NATIVE_BACKGROUND_EVENTS=1 go test -race ./internal/atspi ./internal/app -run '^TestNative(MatePanelMenu|MateWindowSwitcherOutsideForeground|BackgroundEventFiltering)' -count=1 -p=1 -timeout=90s -v
python3 tests/native_test_session.py env CTHULHU_NATIVE_PANEL_APPLET=1 go test -race ./internal/atspi ./internal/app -run '^TestNativeEmbeddedPanelApplet' -count=1 -p=1 -timeout=90s -v
go test ./internal/app -run '^TestNotificationProvidersAndHistoryMatchReferenceBehavior$' -count=1
```
@@ -55,6 +78,14 @@ inherited labels, own-name/description precedence and unrelated-container
rejection. The event-loop check verifies queued speech and Braille frames for
navigation, dismissal, editor return and reopening. It emits no audible speech.
The socket/plug fixture uses separate host, applet and editor processes. It
checks the shared containing-window identity, preserved applet identity, icon
label inheritance, Tab/Shift+Tab within the applet, host controls on either
side, and editor restoration. It also checks a non-MATE host, background applet
focus, an unrelated applet claiming the MATE application name, and stale focus
after socket destruction. The event-loop check verifies speech requests and
Braille frames through two panel/editor round trips.
The existing background flood regression checks that ordinary same-provider
and other-provider updates still cause zero content queries. The Marco
regression checks switcher insertions and showing events while an editor
@@ -87,6 +118,9 @@ MATE session. After starting the candidate through the normal launcher:
typing and ordinary Tab navigation. Check terminal-reader handoff if used.
3. Use Control+Alt+Tab to reach the panel and navigate its applets. Confirm
applet icons use supplied labels without repeating unrelated container text.
Traverse both directions through launchers, clock, notification area and
configured external applets. Open and dismiss applet controls, then return
to the previous application. Background applet updates must stay silent.
4. Cycle windows with Alt+Tab and Shift+Alt+Tab, then cancel with Escape.
Check a MATE notification and its notification-history entry.
5. Return to browser heading navigation and address-bar suggestions, and open