Use temporary accesskit with patched winit.

This commit is contained in:
Samuel Guerra 2023-10-24 15:09:39 -03:00
parent d2730a81bc
commit 0168a4468e
2 changed files with 6 additions and 6 deletions

View File

@ -88,8 +88,8 @@ rayon = "1"
backtrace = "0.3"
serde = "1"
rfd = { version = "0.12", default_features = false, features = ["xdg-portal"] }
accesskit = { git = "https://github.com/Vrixyz/accesskit.git", branch = "winit-main-after-0.28" }
accesskit_winit = { git = "https://github.com/Vrixyz/accesskit.git", branch = "winit-main-after-0.28" }
accesskit = { git = "https://github.com/SamRodri/accesskit.git", branch = "winit-update-with-fix" }
accesskit_winit = { git = "https://github.com/SamRodri/accesskit.git", branch = "winit-update-with-fix" }
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.48.0"

View File

@ -107,7 +107,7 @@ pub(crate) struct Window {
render_mode: RenderMode,
modal_dialog_active: Arc<AtomicBool>,
// access: accesskit_winit::Adapter,
access: accesskit_winit::Adapter,
}
impl fmt::Debug for Window {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@ -390,7 +390,7 @@ impl Window {
focused: None,
modal_dialog_active: Arc::new(AtomicBool::new(false)),
render_mode,
// access,
access,
};
if !cfg.default_position && win.state.state == WindowState::Normal {
@ -1629,12 +1629,12 @@ impl Window {
}
/// Pump the accessibility adapter.
pub fn pump_access(&mut self, _event: &winit::event::WindowEvent) {
pub fn pump_access(&mut self, event: &winit::event::WindowEvent) {
let _must_use_why = self.access.on_event(&self.window, event);
}
/// Update the accessibility info.
pub fn access_update(&mut self, _update: zero_ui_view_api::access::AccessTreeUpdate) {
pub fn access_update(&mut self, update: zero_ui_view_api::access::AccessTreeUpdate) {
self.access.update_if_active(|| crate::util::access_tree_update_to_kit(update))
}