Expand description
A Wayland client that asks the compositor questions and prints the answers.
Solium cannot test its own protocol support from the inside, and “the global is advertised” is a different claim from “a client that uses it gets the right answers back”. The difference has been the whole story of a week of protocol work: a cursor that was advertised and invisible, a relative pointer that was advertised and correct, a lock that was granted too early to be heard.
Real applications were borrowed for that verification — Firefox’s own
WAYLAND_DEBUG log is a fine oracle — and it works right up until no
installed application happens to use the protocol you just added. Firefox
never binds wp_presentation, so nothing on this machine could tell whether
presentation feedback worked at all. This is that gap, filled.
cargo run -p wl-probeIt maps one small window, waits for a few frames, and reports what came back. Exit status is zero only if every check passed, so it can be a gate.
Structs§
- Presented 🔒
- Probe 🔒
- Screen 🔒
- One
wl_output, as a client learns about it. - Shot 🔒
- A screen capture in progress.
Constants§
- BAR 🔒
- How tall a probe bar is, and how much of the screen it reserves.
- FRAMES 🔒
- How many frames to ask about before reporting.
Functions§
- anchor_
a_ 🔒bar - Anchor a bar to the top of every monitor and check where each one landed.
- layouts_
in_ 🔒keymap - Read the keymap the compositor sent and pull the layout names out of it.
- layouts_
in_ 🔒keymap_ text - The layout names a keymap declares, in group order.
- lock_
the_ 🔒session - Lock the session, hold it, and let it go.
- main 🔒
- map_
and_ 🔒measure - Put a window up, ask about
FRAMESframes, and check the answers. - screen_
pixels 🔒 - The first output’s width in device pixels.
- settle 🔒
- Flush, wait for the compositor to answer, dispatch whatever arrived.
- show_
popup 🔒 WL_PROBE_POPUP=<seconds>: a 520x360 toplevel in the window colour and a 160x120 popup in the menu colour, anchored 20 px inside its bottom-right corner so it reaches past it.- show_
windows 🔒 - Map two windows – one decorated by the compositor, one not – and hold them up to be looked at.
- solid_
buffer 🔒 - A buffer with something in it, so the compositor has a frame to present.
- take_
a_ 🔒shot - Ask for a screenshot, and look at it.
- tempfile 🔒
- An anonymous file of
sizebytes, filled with an opaque colour. - tempfile_
rs 🔒 - tinted_
buffer 🔒 - The same, in a colour of the caller’s choosing.
- watch_
idle 🔒 - Go idle, be held awake, and go idle again.
- watch_
keyboard 🔒 - Map a window, take focus, and report every layout change that arrives.
- write_
ppm 🔒 - Write a captured buffer out as a binary PPM, so a person can look at it.