2024-04-19 14:57:17 +02:00
|
|
|
use smithay::{
|
2026-04-28 16:58:33 -07:00
|
|
|
reexports::wayland_server::protocol::wl_surface::WlSurface,
|
2024-04-19 14:57:17 +02:00
|
|
|
wayland::idle_inhibit::IdleInhibitHandler,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
use crate::state::State;
|
|
|
|
|
|
|
|
|
|
impl IdleInhibitHandler for State {
|
|
|
|
|
fn inhibit(&mut self, surface: WlSurface) {
|
|
|
|
|
self.common.idle_inhibiting_surfaces.insert(surface);
|
|
|
|
|
self.common.idle_notifier_state.set_is_inhibited(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn uninhibit(&mut self, surface: WlSurface) {
|
|
|
|
|
self.common.idle_inhibiting_surfaces.remove(&surface);
|
|
|
|
|
self.common.refresh_idle_inhibit();
|
|
|
|
|
}
|
|
|
|
|
}
|