Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion renderer/linux/src/LinuxWindow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
3 changes: 3 additions & 0 deletions renderer/linux/test/LinuxWindowTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion renderer/scripts/build-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions scripts/tests/linux-native-window.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading