#[non_exhaustive]pub enum SessionEvent {
Paused,
Resumed {
devices: Vec<TakenDevice>,
},
DeviceLost {
path: PathBuf,
error: String,
},
}Expand description
What a caller needs to act on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Paused
Stop touching every device now.
The descriptors are about to stop working. Anything mapped from them has to be released by the caller – closing a descriptor does not unmap it, so a compositor that skips that leaks per switch.
Resumed
The devices are back, on new descriptors.
Every per-descriptor kernel object is gone: framebuffers, property blobs, client capabilities, GEM handles. All of it is rebuilt.
Fields
devices: Vec<TakenDevice>The devices as they now stand, in the order they were taken –
those that came back. One that could not be reopened is reported
by a SessionEvent::DeviceLost queued ahead of this, and is no
longer held.
DeviceLost
A device could not be reopened on resume.
The descriptor the caller held for it was closed with the pause, and
there is no new one: everything on that device is gone until the
caller takes it again. The other devices are unaffected and come back
in the SessionEvent::Resumed that follows. The reference reports the
same through its resume_failed_cb (drm-cxx#246).