Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
68205fe
Feat: Open the Win32 and X11 toolkit-free windows by default (NFR-14)
b-re-w Oct 4, 2026
9926f6f
Fix: Hold the caption's last press in a plain array (NFR-14)
b-re-w Oct 4, 2026
5d2bce0
Chore: Keep Linux on the toolkit window until the X11 window is check…
b-re-w Oct 4, 2026
9c83cf8
Fix: Map every key the X11 window knows and answer -1 for the rest (N…
b-re-w Oct 4, 2026
0b516d1
Test: Add a hand-check app for trying a renderer on a real desktop
b-re-w Oct 4, 2026
ba6f601
Test: A virtual key for a letter is that letter now (NFR-14)
b-re-w Oct 4, 2026
30e3b3c
Merge remote-tracking branch 'origin/feat/appkit-window-default' into…
b-re-w Oct 4, 2026
e9e95f9
Fix: Set DXGI_SCALING_NONE on the Win32 swapchain so a skipped resize…
b-re-w Oct 4, 2026
bd0de92
Merge remote-tracking branch 'origin/feat/appkit-window-default' into…
b-re-w Oct 4, 2026
0d4ae49
Merge remote-tracking branch 'origin/feat/appkit-window-default' into…
b-re-w Oct 4, 2026
2c01c21
Merge remote-tracking branch 'origin/feat/appkit-window-default' into…
b-re-w Oct 4, 2026
dc1ebad
Merge remote-tracking branch 'origin/feat/graalvm-renderer-test' into…
b-re-w Oct 4, 2026
605ad41
Merge remote-tracking branch 'origin/feat/appkit-window-default' into…
b-re-w Oct 4, 2026
545dfd6
Merge remote-tracking branch 'origin/feat/win-linux-window-default' i…
b-re-w Oct 4, 2026
ace5c84
Docs: Table of the window logic the GraalVM and Kotlin/Native paths e…
b-re-w Oct 4, 2026
0122086
Feat: One X11 key and modifier table for both X11 windows
b-re-w Oct 4, 2026
f828092
Feat: One input method model for both X11 windows
b-re-w Oct 4, 2026
bc23fe3
Feat: Latency tracing and synthetic input on the Kotlin/Native Linux …
b-re-w Oct 4, 2026
3a58986
Chore: Run one parity checklist on the Kotlin/Native and GraalVM Linu…
b-re-w Oct 4, 2026
6ac2552
Feat: Count a resize with the one C header on the GraalVM X11 window …
b-re-w Oct 4, 2026
d2c3d9b
Docs: Record what moved and what changes behaviour in the shared wind…
b-re-w Oct 4, 2026
83c3830
Feat: One reading of the window's options and one size-hint rule for …
b-re-w Oct 4, 2026
1ab35ec
Test: Accept the window's open() taking the size hints as parameters
b-re-w Oct 4, 2026
5fb3cd4
Feat: Measure the share of frames drawn at a size other than the wind…
b-re-w Oct 4, 2026
f7a8944
Fix: Bound every call the parity script makes to the display server
b-re-w Oct 4, 2026
3d27d1c
Fix: Answer System.nanoTime on macOS from the monotonic time source
b-re-w Oct 4, 2026
4535e67
Merge remote-tracking branch 'origin/develop' into feat/shared-window…
b-re-w Oct 4, 2026
555aa26
Feat: Latency tracing, synthetic input and resize accounting on the K…
b-re-w Oct 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/static-renderer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,49 @@ jobs:
# field and a button. See the script for what this proves and what it cannot.
run: xvfb-run -a -s '-screen 0 1280x1024x24' ./.github/scripts/check-linux-input-access.sh renderer/build/linux "$RUNNER_TEMP/input-access"

- name: Parity checklist and measurements, Kotlin/Native path
if: inputs.target == 'linux-x64'
timeout-minutes: 12
# The same checklist and the same measurements test-graalvm-renderer.yml runs on the
# GraalVM path, with the same application (the consumer fixture the step above
# built). The table is in the job summary; a row that fails is a warning, not a stop.
run: |
sudo apt-get install -y xclip
xvfb-run -a -s '-screen 0 1280x1024x24' ./scripts/parity/linux.sh native "$RUNNER_TEMP/parity" -- \
"$PWD/target/linux-input-check/debug/consumer" --parity

- name: Keep the parity run's logs
if: always() && inputs.target == 'linux-x64'
uses: actions/upload-artifact@v4
with:
name: parity-native-linux
path: ${{ runner.temp }}/parity/
if-no-files-found: ignore
retention-days: 7

- name: Parity measurements, Kotlin/Native macOS path
if: inputs.target == 'macos-aarch64'
timeout-minutes: 15
# The measured half of the checklist test-graalvm-renderer.yml runs on the GraalVM
# path, with the same application: the consumer fixture, linked to the renderer built
# above. A hosted session cannot post a key from outside, so the rows that need a
# hand say n/a. The table is in the job summary.
run: |
rustup toolchain install stable --profile minimal && rustup default stable
DXC_MACOS_NATIVE_LIB="$PWD/renderer/build/macos" CARGO_TARGET_DIR="$PWD/target/parity" \
cargo build --manifest-path compose-rust/tests/fixtures/consumer/Cargo.toml
./scripts/parity/macos.sh native "$RUNNER_TEMP/parity" -- \
"$PWD/target/parity/debug/consumer" --parity

- name: Keep the macOS parity run's logs
if: always() && inputs.target == 'macos-aarch64'
uses: actions/upload-artifact@v4
with:
name: parity-native-macos
path: ${{ runner.temp }}/parity/
if-no-files-found: ignore
retention-days: 7

- name: Keep the input and accessibility check's logs
if: always() && inputs.target == 'linux-x64'
uses: actions/upload-artifact@v4
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-graalvm-renderer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- 'renderer/**/module.yaml'
- 'scripts/install-nik.sh'
- 'scripts/tests/renderer/**'
- 'scripts/parity/**'
- '.github/workflows/test-graalvm-renderer.yml'
push:
branches: [develop]
Expand All @@ -30,6 +31,7 @@ on:
- 'renderer/**/module.yaml'
- 'scripts/install-nik.sh'
- 'scripts/tests/renderer/**'
- 'scripts/parity/**'
- '.github/workflows/test-graalvm-renderer.yml'
workflow_dispatch:

Expand Down Expand Up @@ -81,6 +83,28 @@ jobs:
- name: Report the distribution size
run: du -sh renderer/build/native-image/dist/lib

- name: Parity measurements, GraalVM path
timeout-minutes: 15
# The measured half of the checklist static-renderer.yml runs on the Kotlin/Native
# path, with the same application: the consumer fixture, linked to the renderer this
# job just built. A hosted session cannot post a key from outside, so the rows that
# need a hand say n/a. The table is in the job summary.
run: |
dist="$PWD/renderer/build/native-image/dist/lib"
COMPOSE_RUST_RENDERER_DIR="$dist" CARGO_TARGET_DIR="$PWD/target/parity" \
cargo build --manifest-path compose-rust/tests/fixtures/consumer/Cargo.toml
DYLD_LIBRARY_PATH="$dist" ./scripts/parity/macos.sh graalvm "$RUNNER_TEMP/parity" -- \
"$PWD/target/parity/debug/consumer" --parity

- name: Keep the parity run's logs
if: always()
uses: actions/upload-artifact@v4
with:
name: parity-graalvm-macos-arm64
path: ${{ runner.temp }}/parity/
if-no-files-found: ignore
retention-days: 7

- name: Upload the renderer for inspection
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -139,6 +163,30 @@ jobs:
COMPOSE_RUST_AUTOEXIT_MS: '5000'
run: xvfb-run -a ./renderer/desktop/scripts/smoke-test-linux.sh

- name: Parity checklist and measurements, GraalVM path
timeout-minutes: 15
# The same checklist and the same measurements static-renderer.yml runs on the
# Kotlin/Native path, with the same application: the consumer fixture, linked to the
# renderer this job just built. The table is in the job summary; a row that fails is
# a warning, not a stop.
run: |
sudo apt-get install -y xdotool xclip x11-utils
dist="$PWD/renderer/build/native-image-linux/dist/lib"
COMPOSE_RUST_RENDERER_DIR="$dist" CARGO_TARGET_DIR="$PWD/target/parity" \
cargo build --manifest-path compose-rust/tests/fixtures/consumer/Cargo.toml
LD_LIBRARY_PATH="$dist" xvfb-run -a -s '-screen 0 1280x1024x24' \
./scripts/parity/linux.sh graalvm "$RUNNER_TEMP/parity" -- \
"$PWD/target/parity/debug/consumer" --parity

- name: Keep the parity run's logs
if: always()
uses: actions/upload-artifact@v4
with:
name: parity-graalvm-linux-x64
path: ${{ runner.temp }}/parity/
if-no-files-found: ignore
retention-days: 7

- name: Upload the Linux renderer for inspection
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ target
# needs at the time, and tracking it would mean a second lock file to update on every
# dependency change, plus a dirty working tree every time the test runs.
compose-rust/tests/fixtures/consumer/Cargo.lock
compose-rust/tests/fixtures/hand-check/Cargo.lock

# The Host's wasm module, built next to the page by
# renderer/web/scripts/build-host.sh. The loader beside it is generated and
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

## Unreleased

### Windows opens its own window, and Linux's is finished but not the default

The Win32 window is now the default on the native-image path, with no environment
variable. The X11 window is finished the same way but Linux keeps the toolkit's window
until typing, copy and paste and Korean input have been checked on a real desktop; set
`DXC_X11_WINDOW` to try it. Windows keeps its frame and takes the caption strip into the content as before
(the logic moved from the shim into the window's own procedure), and now honours the
application's minimum size, resizable choice and icon, has a clipboard, and takes files
dropped on a drop target. Linux draws its own caption and edges and hands the move and the
resize to the window manager, has the CLIPBOARD and PRIMARY selections, text input with
composition through XIM, drag and drop of files, the application's icon, and the display
scale. The caret position is sent to the input method so candidate windows open beside it.
Not done on Linux: AT-SPI accessibility, which is being built for the Kotlin/Native window.

### The native-image renderer opens its own window on macOS

On the GraalVM native-image path, macOS now opens the AppKit window the renderer makes
Expand Down
32 changes: 31 additions & 1 deletion compose-rust/tests/fixtures/consumer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@
//! each press of the button. That is the only way the check can tell that an event arrived
//! all the way at the Host.
//!
//! `--parity` is that window with a title and a smallest size of its own, for
//! `scripts/parity/linux.sh`, which reads both back from the display server.
//!
//! The call to launch stays in the binary because the branch is decided at run time.
//! That is what makes the renderer a load-time dependency of this executable rather than
//! a library the linker drops for being unused.

use compose_rust::boundary::STATUS_OK;
use compose_rust::protocol::{HostEvent, Mutation, PropertyValue, ProtocolError};
use compose_rust::schema::{EventPayload, PropertyKind, WidgetKind};
use compose_rust::schema::{EventPayload, PropertyKind, WidgetKind, Window};
use compose_rust::{Batch, LaunchBuilder, Runtime};
use std::ffi::c_int;
use std::sync::atomic::{AtomicU32, Ordering};
Expand Down Expand Up @@ -151,6 +154,10 @@ impl Runtime for Screen {
}
}

/// The smallest size `--parity` asks the window to allow, which the parity check reads back.
const PARITY_MIN_WIDTH: u16 = 300;
const PARITY_MIN_HEIGHT: u16 = 260;

const FORM: u32 = 10;
const FIELD: u32 = 11;
const SAVE: u32 = 12;
Expand All @@ -160,12 +167,23 @@ const ON_CLICK: u64 = 2;
/// A column holding a text field and a button, and nothing else.
struct Form {
batch: Batch,
/// Asks for a window of its own: a title and a smallest size, which the parity check reads
/// back from the display server on every path.
parity: bool,
}

impl Form {
fn new() -> Self {
Self {
batch: Batch::new(),
parity: false,
}
}

fn for_parity() -> Self {
Self {
batch: Batch::new(),
parity: true,
}
}

Expand Down Expand Up @@ -196,6 +214,14 @@ impl Runtime for Form {
}

fn rebuild(&mut self) {
if self.parity {
self.batch.write(Mutation::SetWindow(Window {
title: "compose-rust parity",
min_width: PARITY_MIN_WIDTH,
min_height: PARITY_MIN_HEIGHT,
..Window::new()
}));
}
for (node_id, widget) in [
(FORM, WidgetKind::Column),
(FIELD, WidgetKind::TextField),
Expand Down Expand Up @@ -301,6 +327,10 @@ fn main() {
LaunchBuilder::new().launch_runtime(|| Box::new(Form::new()) as Box<dyn Runtime>);
return;
}
if std::env::args().any(|argument| argument == "--parity") {
LaunchBuilder::new().launch_runtime(|| Box::new(Form::for_parity()) as Box<dyn Runtime>);
return;
}
if std::env::args().any(|argument| argument == "--launch") {
LaunchBuilder::new().launch_runtime(|| Box::new(Screen::new(false)) as Box<dyn Runtime>);
return;
Expand Down
16 changes: 16 additions & 0 deletions compose-rust/tests/fixtures/hand-check/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# A window to check by hand on a real desktop: text shortcuts, live resize, an input method,
# focus between two fields, a click and a scrolling list with Korean in it.
#
# Like the consumer fixture next to it, this is its own workspace root, so `cargo run` works
# in this directory on Windows, macOS and Linux whatever the enclosing workspace says. It
# names its edition outright for the same reason: an excluded crate cannot inherit one.
[workspace]

[package]
name = "hand-check"
version = "0.0.0"
edition = "2024"
publish = false

[dependencies]
compose-rust = { path = "../../.." }
35 changes: 35 additions & 0 deletions compose-rust/tests/fixtures/hand-check/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# hand-check

A window to check a renderer by hand on a real desktop. It has a click counter, two text
fields, a line showing the window's size class, and a scrolling list with Korean rows. What
the fields hold is echoed under each, and every change is printed to standard output as an
`event:` line.

Set `COMPOSE_RUST_RENDERER_DIR` to the renderer you want to try, then run it from this
directory. The commands are the same on every desktop apart from how the variable is set.

```sh
# macOS and Linux
COMPOSE_RUST_RENDERER_DIR=/path/to/renderer/dist cargo run --release
```

```powershell
# Windows (PowerShell). The renderer's bin folder has to be on PATH as well.
$env:COMPOSE_RUST_RENDERER_DIR = "C:\path\to\renderer\dist"
$env:PATH = "C:\path\to\renderer\dist\bin;$env:PATH"
cargo run --release
```

On Linux the X11 window is opt-in until it is the default: add `DXC_X11_WINDOW=1`.

## What to check

| Check | How | What you should see |
| --- | --- | --- |
| Text shortcuts | In the first field select with ctrl or cmd+A, then C, X, V and Z | The echo line under the field shows the paste, the cut and the undo; `event: first ...` lines print |
| Clipboard across apps | Copy in another app, paste here, and the other way round | The text, Korean included, arrives |
| Live resize | Drag an edge and a corner, at 100% and at 200% scale | Content follows the edge with no lag or flash; the `window:` line shows the size class and size when it changes |
| Input method | Type Korean (`han-geul`) in a field | Underlined text while composing, and the candidate window beside the caret, not at the corner |
| Focus | Click each field, press Tab | Only one field has the caret, and typing goes to it |
| Click | Press the button | The counter counts and `event: click N` prints |
| Scrolling | Scroll the list with the wheel and the scrollbar | 60 rows move smoothly |
Loading
Loading