fix: a11y_ready state for sctk surfaces

This commit is contained in:
Ashley Wulber 2026-04-01 17:11:20 -04:00 committed by Ashley Wulber
parent 04c273a79b
commit e4da5002ae
3 changed files with 25 additions and 6 deletions

View file

@ -610,6 +610,11 @@ where
#[cfg(feature = "a11y")]
Control::InitAdapter(id, window) => {
self.init_adapter(event_loop, id, window);
self.process_event(
event_loop,
Some(Event::A11yAdapter(id)),
);
}
#[cfg(feature = "a11y")]
Control::Cleanup(id) => {
@ -1027,7 +1032,7 @@ async fn run_instance<P>(
};
window.redraw_requested = false;
if !window.state.ready {
if !window.state.is_ready() {
control_sender
.start_send(Control::Winit(
window.raw.id(),
@ -1910,7 +1915,7 @@ async fn run_instance<P>(
#[cfg(feature = "a11y")]
Event::A11yAdapter(window_id) => {
if let Some(window) = window_manager.get_mut(window_id) {
window.state.ready = true;
window.state.set_a11y_ready(true);
}
}
_ => {}