diff --git a/platforms/windows/src/tests/mod.rs b/platforms/windows/src/tests/mod.rs
index 0b1f7f8c..6160346a 100644
--- a/platforms/windows/src/tests/mod.rs
+++ b/platforms/windows/src/tests/mod.rs
@@ -8,7 +8,7 @@ use once_cell::{sync::Lazy as SyncLazy, unsync::Lazy};
use std::{
cell::RefCell,
rc::Rc,
- sync::{Condvar, Mutex},
+ sync::{Arc, Condvar, Mutex},
thread,
time::Duration,
};
@@ -262,14 +262,19 @@ where
})
}
+/// This must only be used to wrap UIA elements returned by a UIA client
+/// that was created in the MTA. Those are safe to send between threads.
+struct SendableUiaElement(IUIAutomationElement);
+unsafe impl Send for SendableUiaElement {}
+
pub(crate) struct ReceivedFocusEvent {
- mutex: Mutex