Skip to main content

Crate wl_probe

Crate wl_probe 

Source
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-probe

It 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 FRAMES frames, 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 size bytes, 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.