Stop Snowcap on drop

Prevents a hang on panic
This commit is contained in:
Ottatop 2024-07-02 16:24:29 -05:00
parent 51589cf484
commit ebba3db6d0

View file

@ -183,6 +183,14 @@ pub struct Pinnacle {
pub cursor_state: CursorState,
}
impl Drop for Pinnacle {
fn drop(&mut self) {
if let Some(signal) = self.snowcap_stop_signal.take() {
signal.stop();
}
}
}
impl State {
pub fn on_event_loop_cycle_completion(&mut self) {
self.pinnacle.fixup_z_layering();