Fail gamma control on output removal

This commit is contained in:
Ottatop 2024-04-10 09:39:33 -05:00
parent c4d811fd97
commit 7ee97f2589
2 changed files with 7 additions and 0 deletions

View file

@ -1186,6 +1186,7 @@ impl State {
},
);
self.space.unmap_output(&output);
self.gamma_control_manager_state.output_removed(&output);
}
}

View file

@ -43,6 +43,12 @@ impl GammaControlManagerState {
gamma_controls: HashMap::new(),
}
}
pub fn output_removed(&mut self, output: &Output) {
if let Some(gamma_control) = self.gamma_controls.remove(output) {
gamma_control.failed();
}
}
}
pub struct GammaControlState {