fix: feature gates

This commit is contained in:
Ashley Wulber 2026-03-30 17:13:34 -04:00 committed by Ashley Wulber
parent d4b0c0482b
commit 1fdd24ab99
2 changed files with 7 additions and 2 deletions

View file

@ -18,7 +18,7 @@ impl fmt::Debug for Action {
match self { match self {
#[cfg(all(feature = "cctk", target_os = "linux"))] #[cfg(all(feature = "cctk", target_os = "linux"))]
Action::Wayland(action) => action.fmt(_f), Action::Wayland(action) => action.fmt(_f),
#[cfg(not(feature = "wayland"))] #[cfg(not(all(feature = "cctk", target_os = "linux")))]
_ => Ok(()), _ => Ok(()),
} }
} }

View file

@ -611,6 +611,7 @@ where
Control::InitAdapter(id, window) => { Control::InitAdapter(id, window) => {
self.init_adapter(event_loop, id, window); self.init_adapter(event_loop, id, window);
} }
#[cfg(feature = "a11y")]
Control::Cleanup(id) => { Control::Cleanup(id) => {
_ = self.adapters.remove(&id); _ = self.adapters.remove(&id);
}, },
@ -716,6 +717,7 @@ enum Control {
ChangeFlow(winit::event_loop::ControlFlow), ChangeFlow(winit::event_loop::ControlFlow),
Exit, Exit,
Crash(Error), Crash(Error),
#[cfg(feature = "a11y")]
Cleanup(window::Id), Cleanup(window::Id),
CreateWindow { CreateWindow {
id: window::Id, id: window::Id,
@ -2147,7 +2149,10 @@ where
window::Action::Close(id) => { window::Action::Close(id) => {
let _ = ui_caches.remove(&id); let _ = ui_caches.remove(&id);
let _ = interfaces.remove(&id); let _ = interfaces.remove(&id);
_ = control_sender.start_send(Control::Cleanup(id)).ok(); #[cfg(feature = "a11y")]
{
_ = control_sender.start_send(Control::Cleanup(id)).ok();
}
let proxy = clipboard.proxy(); let proxy = clipboard.proxy();
#[cfg(all(feature = "cctk", target_os = "linux"))] #[cfg(all(feature = "cctk", target_os = "linux"))]
platform_specific platform_specific