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 {
#[cfg(all(feature = "cctk", target_os = "linux"))]
Action::Wayland(action) => action.fmt(_f),
#[cfg(not(feature = "wayland"))]
#[cfg(not(all(feature = "cctk", target_os = "linux")))]
_ => Ok(()),
}
}

View file

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