T46: Ely peeks over the main window's top edge from behind it, as the owner asked after the 0.1.3 film: her head and fingers from the icon's paths in a transparent window of her own, kept on the edge as each platform allows, macOS's child window, Windows' owned popup, X11's popup moved and stacked above the frame, Wayland's anchored popup; ten faces follow the most pressing of the sessions' marks, with hops, a shake and a rise; a press winks; Settings, Terminal, Ely turns her off
CI / platforms (windows-latest) (push) Failing after 10s
CI / platforms (ubuntu-24.04) (push) Successful in 1m52s
CI / macos (push) Successful in 12m52s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-18 05:06:59 -04:00
1 parent b35eb52d9a
commit 9aeb3f3552
22 files changed
+1090 -45

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
//! Xvfb for the X11 tests.
use std::{
io::{BufRead, BufReader},
process::{Child, Command, Stdio},
};
/// An X server of the test's own, gone with it.
pub struct Xvfb {
child: Child,
pub display: String,
}
impl Xvfb {
pub fn start() -> Self {
let mut child = Command::new("Xvfb")
.args(["-displayfd", "1", "-nolisten", "tcp"])
.stdout(Stdio::piped())
.spawn()
.expect("Xvfb starts: the X11 tests need it");
let mut number = String::new();
let stdout = child.stdout.take().expect("Xvfb's stdout");
BufReader::new(stdout)
.read_line(&mut number)
.expect("Xvfb names its display");
let display = format!(":{}", number.trim());
Self { child, display }
}
}
impl Drop for Xvfb {
fn drop(&mut self) {
if let Err(error) = self.child.kill().and_then(|()| self.child.wait().map(drop)) {
eprintln!("Xvfb {} did not stop: {error}", self.display);
}
}
}