1
0
Fork 0
forked from wry/wry

state: deduplicate inhibitor code

This commit is contained in:
Julian Orth 2026-03-07 14:52:26 +01:00
parent 603ed6852f
commit 48852f45ff
2 changed files with 11 additions and 6 deletions

View file

@ -43,11 +43,13 @@ impl ZwpIdleInhibitorV1 {
}
pub fn activate(self: &Rc<Self>) {
self.client.state.idle.add_inhibitor(self);
let state = &self.client.state;
state.idle.add_inhibitor(self);
}
pub fn deactivate(&self) {
self.client.state.idle.remove_inhibitor(self);
let state = &self.client.state;
state.idle.remove_inhibitor(self);
}
}