Skip to content

Feat: AT-SPI on the GraalVM X11 window, the Linux wake and parity measurements, from the fork - #251

Merged
b-re-w merged 7 commits into
developfrom
feat/linux-a11y-wake-repin
Oct 17, 2026
Merged

b-re-w merged 7 commits into
developfrom
feat/linux-a11y-wake-repin

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 17, 2026

Copy link
Copy Markdown
Member

Closes #139
Closes #247
Part of #151 (its Windows parts are with the fork's Windows window module, #32 there)

Pins the fork window modules at 76b599e7 (thisisthepy/compose-multiplatform-core-extended #127 and #129, merged) and keeps only the glue here.

From the fork:

Here:

  • GraalVM X11 glue joins the bus (X11Accessibility), fans the scene's semantics to the window records and the AT-SPI tree, publishes and answers after each frame.
  • Wake: GraalVM FrameDispatcher and FrameMainDispatcher (LoopWake) and the Kotlin/Native FrameDispatcher (wakeLoop) wake the window when work arrives from another thread.
  • Parity: DXC_SYNTH, LatencyTrace and the dxc resize: line on the Kotlin/Native Linux, GraalVM X11 and Kotlin/Native macOS windows; the parity scripts run on both paths on Linux and macOS in CI.
  • The Korean input and AT-SPI check (check-linux-input-access.sh) now also runs against the GraalVM X11 window.
  • docs/design/shared-window-logic.md (from Feat: Share the desktop window logic between the GraalVM and Kotlin/Native paths, with parity checks #155) rewritten for the fork move.

Wake latency (200 posts from another thread to the window thread running, window idle in its wait), measured in fork CI: GraalVM median 0.015 ms, p99 0.023 ms, max 0.031 ms; Kotlin/Native median 0.029 ms, p99 0.062 ms, max 0.098 ms. Before: up to the 16 ms turn wait. renderer/linux/test/WakeLatencyTest.kt measures the full dispatcher path here.

Needs a person on a real Linux desktop: Orca reading the GraalVM X11 window, and typing English and Korean in it (the key and composition rule is now the Kotlin/Native one).

The extended pin also brings in what merged there since 56970754: the Windows window module (#32 there, not used by this renderer yet) and the macOS vertical resize anchor (#107 there).

…the fork (NFR-8, PR-3)

Pins the fork window modules at 76b599e7, which carries core-extended #127 and #129: the AT-SPI
protocol in common and served from the GraalVM X11 window too, WindowPlatform.wake on both
X11 windows, one key and input method model on both, resize counts and a scripted drag on
both, and measuring hooks on the Kotlin/Native macOS window. The glue that uses them:

- GraalVM X11 (renderer/desktop/src/X11Window.kt): joins the accessibility bus through
  X11Accessibility, with the scene's semantics told to both the window's records and the
  AT-SPI tree (SemanticsFanOut), and publishes and answers once a turn after drawing.
- Wake: the scene's FrameDispatcher and FrameMainDispatcher (LoopWake) on the GraalVM path, and
  the Kotlin/Native FrameDispatcher (wakeLoop), end the window's wait when work arrives from
  another thread, so a worker's frame request or a Main resume runs on the next turn at once.
- Parity: DXC_SYNTH, LatencyTrace and the "dxc resize:" line on the Kotlin/Native Linux
  window, the GraalVM X11 window and the Kotlin/Native macOS window (MacosParityRun).
  LatencyTrace and SyntheticInput are linked into the Linux and macOS renderers.
- CI: the Korean input and AT-SPI check runs against the GraalVM X11 window as well as the
  Kotlin/Native one, and the parity scripts run on both paths on Linux and macOS.

Tests: LoopWakeTest (desktop and linux), WakeLatencyTest (linux: 200 worker dispatches on the
renderer's dispatcher to the block running on the window thread, p99 under 1 ms, median, p99
and max printed), parity-linux.test.sh, and x11-key-codes.test.sh, linux-input-access.test.sh
and x11-window-frames.test.sh updated for what the fork now holds. Measured in the fork's CI,
the wake from another thread to the window thread running: GraalVM median 0.015 ms, p99
0.023 ms, max 0.031 ms; Kotlin/Native median 0.029 ms, p99 0.062 ms, max 0.098 ms.

Closes #139, closes #247.
… X11 changes

docs/design/shared-window-logic.md is #155's table of what the two window paths shared,
rewritten for the move into the fork's window modules: what is one copy now, how the parity
checks run, and what needs a person on a Linux desktop. CHANGELOG says what changed on the
GraalVM X11 window and the wake.
…field where it is (NFR-8)

Pins the fork window modules at 1b3de18f (core-extended #132), whose AppKit window answers the
X11 calls #127 and #129 added. The renderer's one image carries the X11 window module on every
desktop and links every C call its reachable code names: Windows failed to link without
dxc_native_wake, window_origin, window_focused, ime_reset, resize_serial and
window_server_size, and macOS died at dxc_native_ime_reset. win32_window.c answers them with
nothing too, and desktop-c-symbols.test.sh now requires them on macOS and Windows.

The Korean input check clicked 28 pixels down, which on the GraalVM X11 window is its own
caption, so the field never opened a text input session and the composed word went nowhere.
It now clicks the field where the AT-SPI walk found it.

The parity run waits for the window to say it sent its made-up letters; the Linux windows
now say so, as the macOS one does. LinuxWindowTest put DISPLAY back after its no-display
case, because WakeLatencyTest ran after it with no display and measured nothing; under CI a
missing display now fails that test instead of skipping it.
… element type

The fork's Kotlin/Native macOS window describes itself with its own AccessibleElement, the
same fields and roles as the common one SyntheticInput reads, and the macOS renderer did not
compile with one passed for the other.
b-re-w added a commit that referenced this pull request Oct 17, 2026
The instrumented branch of the fork sits on the newest extended, which also moves the
published coordinates; the probe measures the code #251 ships, so the instrumentation is
cherry-picked onto 1b3de18f.
…ke-repin

# Conflicts:
#	.github/workflows/test-graalvm-renderer.yml
#	renderer/scripts/build-compose.sh
b-re-w added a commit that referenced this pull request Oct 17, 2026
… fix

Pins the probe at the fork fix for scripted drags (core-extended #140, cherry-picked onto the
#251 pin) and makes resize_stale_ratio and resize_stretched a gate (PARITY_GATE) on both Linux
paths: a frame at a size other than the window's, or a size without a frame, fails the run.
@b-re-w
b-re-w merged commit f4026b1 into develop Oct 17, 2026
36 checks passed
@b-re-w
b-re-w deleted the feat/linux-a11y-wake-repin branch October 17, 2026 22:05
b-re-w added a commit that referenced this pull request Oct 17, 2026
…renderer, with System.nanoTime

#251 made the interpreter's NativeHostConnection mark latency through
LatencyTrace, which every Kotlin/Native renderer links from desktop/src. The
Windows module links it and SyntheticInput the way macOS and Linux do, and its
System shim answers nanoTime from the monotonic clock as theirs does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-heavy-ci Run the heavy CI workflows on this pull request's head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant