pub(crate) fn watch_idle(
connection: &Connection,
queue: &mut EventQueue<Probe>,
probe: &mut Probe,
) -> Result<(), String>Expand description
Go idle, be held awake, and go idle again.
Run with WL_PROBE_IDLE=1. The two protocols this exercises are only
correct together, so it checks them together, as one sequence:
- ask to be told after a short timeout, touch nothing, and be told;
- take an inhibitor on a mapped window, and be told we are back;
- hold it through more than the timeout, and be told nothing;
- drop it, and be told again.
Steps 2 and 4 are the ones that matter. A compositor that advertises the inhibitor and ignores it passes step 1 and step 3 looks identical to a compositor whose timer simply stopped – so the check is the whole sequence, not any one event in it.