From fc004e88f19cde2fe91114e931501cedab570544 Mon Sep 17 00:00:00 2001 From: BREW <81044362+b-re-w@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:46:13 +0900 Subject: [PATCH 1/2] Chore: Pin the window modules at the fork's multi-window merge (FR-53) WINDOW_REVISION moves to 317d380, which holds fork #176 (several windows per process on macOS, Linux and Windows) and #173. The Linux event read now lives in the shared X11 connection, so the layout test reads it there. --- renderer/scripts/build-compose.sh | 2 +- scripts/tests/linux-native-window.test.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/renderer/scripts/build-compose.sh b/renderer/scripts/build-compose.sh index 569dad78a..29a9076e0 100755 --- a/renderer/scripts/build-compose.sh +++ b/renderer/scripts/build-compose.sh @@ -41,7 +41,7 @@ REVISION="2eb80c12e7615ef80c7661ea63e0f20651f20a31" # accessibility bridges (the renderer hands them the scene's semantics). It replaces the # backport branch feat/windows-window-backport-57b4a0e, which carried those two fixes on an # older base; multi-window work builds on `extended` itself. -WINDOW_REVISION="2eb80c12e7615ef80c7661ea63e0f20651f20a31" +WINDOW_REVISION="317d380b4c34fc324c47811bd71fa76543510a94" # The commit the Windows build takes. It was its own pin while the Windows Compose lived on a # branch apart from the Compose pin; the fork's `extended` now holds mingwX64 for every Compose UI # module, the skiko build for mingwX64 (extended/skiko/build-skiko-mingw.sh, which also compiles diff --git a/scripts/tests/linux-native-window.test.sh b/scripts/tests/linux-native-window.test.sh index 8dbe46c7f..319c938e6 100755 --- a/scripts/tests/linux-native-window.test.sh +++ b/scripts/tests/linux-native-window.test.sh @@ -230,10 +230,12 @@ grep -Fq 'WindowEvent.RESIZE' <<< "$resize_branch" && grep -Fq 'frames.draw()' < grep -Fq 'Expose ->' "$window" || fail "the window ignores being uncovered" # Events are read in one place, through the guard, because a frame drawn inside a resize draws from -# the middle of reading an event. -grep -Fq 'log.read {' "$window" || - fail "the window reads the display server without the guard that stops a read inside a read" -if [[ "$(grep -v '^import ' "$window" | grep -c 'XNextEvent')" != "1" ]]; then +# the middle of reading an event. With several windows the read is the shared connection's, once +# per turn for every window; the guard is its `reading` flag. +connection="$(dirname "$window")/X11Connection.kt" +grep -Fq 'if (!reading) {' "$connection" || + fail "the connection reads the display server without the guard that stops a read inside a read" +if [[ "$(cat "$connection" "$window" | grep -v '^import ' | grep -c 'XNextEvent')" != "1" ]]; then fail "the window takes events off the queue in more than one place, which is how the rest of a drag gets drained mid-frame" fi From 945a8e15b6d4f01b7c709db6d13cee0abf940027 Mon Sep 17 00:00:00 2001 From: BREW <81044362+b-re-w@users.noreply.github.com> Date: Tue, 27 Oct 2026 14:32:45 +0900 Subject: [PATCH 2/2] Fix: Close the window the display test opens so the next test sees no shared display connection --- renderer/linux/src/LinuxWindow.kt | 2 +- renderer/linux/test/LinuxWindowTest.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/renderer/linux/src/LinuxWindow.kt b/renderer/linux/src/LinuxWindow.kt index 99e9e1754..3c24b9f0a 100644 --- a/renderer/linux/src/LinuxWindow.kt +++ b/renderer/linux/src/LinuxWindow.kt @@ -342,7 +342,7 @@ internal class LinuxWindow private constructor( x11.setImeSpot(spot.first, spot.second) } - private fun close() { + internal fun close() { scene.close() x11.close() } diff --git a/renderer/linux/test/LinuxWindowTest.kt b/renderer/linux/test/LinuxWindowTest.kt index a2b74e29d..3aaf0d594 100644 --- a/renderer/linux/test/LinuxWindowTest.kt +++ b/renderer/linux/test/LinuxWindowTest.kt @@ -47,6 +47,9 @@ class LinuxWindowTest { "a display server is present and the window did not open: the visual, the colormap, " + "the window or the GL context was refused", ) + // Closed, because the windows of a process share one display connection and the test + // below needs there to be none open to see what a machine with no display server does. + window.close() } @Test