pub fn display(
runtime: Option<&Path>,
wayland: Option<&str>,
device: &Path,
) -> Result<Display, NoDisplay>Expand description
What this machine offers a window, read from the session qcode was started in.
runtime is the runtime folder of the session and wayland the display it names — the two
variables a Wayland session sets. A display named as a bare name is a file in that folder,
which is how every compositor writes it; one named as a path is taken as it is, which a few
setups do. device is where the graphics device would be, so a test can point elsewhere.
Looks at the disk, which is all it does: everything else here is a value.
§Errors
When the session names no compositor, or names one whose socket is not there.