wayland: Move initialization to the Rust side

This will help make the init procedure safer, by limiting the number of Rust objects that need to be carried to the C side and may be mangled on the way there.

The second benefit is that it allows outputs to become part of new state management.
This commit is contained in:
Dorota Czaplejewicz
2022-01-23 17:12:33 +00:00
parent 1b72cbdfaa
commit f4f44a49ae
9 changed files with 148 additions and 91 deletions

View File

@ -29,12 +29,14 @@ pub enum InputMethod {
InactiveSince(Instant),
}
/// Incoming events
/// Incoming events.
/// This contains events that cause a change to the internal state.
#[derive(Clone)]
pub enum Event {
InputMethod(InputMethod),
Visibility(visibility::Event),
PhysicalKeyboard(Presence),
/// Event triggered because a moment in time passed.
/// Use to animate state transitions.
/// The value is the ideal arrival time.