state: Connect the animation state machine to the rest

This ensures that the new state machine is fed events, as well as that its results are applied.

The old ad-hoc system is removed.

There is one regression where the last layout will be used when the panel is brought up manually.
This commit is contained in:
Dorota Czaplejewicz
2021-12-05 14:35:35 +00:00
parent 334504a5b2
commit 53137fd2e2
11 changed files with 225 additions and 252 deletions

View File

@ -23,7 +23,6 @@ pub mod c {
use std::os::raw::{c_char, c_void};
pub use ::ui_manager::c::UIManager;
pub use ::submission::c::StateManager;
// The following defined in C
@ -153,14 +152,14 @@ pub mod c {
if active_changed {
(imservice.active_callback)(imservice.current.active);
}
if imservice.current.active {
unsafe {
eekboard_context_service_set_hint_purpose(
imservice.state_manager,
imservice.current.content_hint.bits(),
imservice.current.content_purpose.clone() as u32,
);
if imservice.current.active {
unsafe {
eekboard_context_service_set_hint_purpose(
imservice.state_manager,
imservice.current.content_hint.bits(),
imservice.current.content_purpose.clone() as u32,
);
}
}
}
}