Provide new Window trait to window::run

Co-authored-by: flakes <cxxjoe@gmail.com>
This commit is contained in:
Héctor Ramón Jiménez 2025-11-20 00:20:24 +01:00
parent 2bbc7385e0
commit bbba0942f8
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 48 additions and 14 deletions

View file

@ -1613,13 +1613,8 @@ fn run_action<'a, P, C>(
let _ = channel.send(window.raw.id().into());
}
}
window::Action::RunWithHandle(id, f) => {
use window::raw_window_handle::HasWindowHandle;
if let Some(handle) = window_manager
.get_mut(id)
.and_then(|window| window.raw.window_handle().ok())
{
window::Action::Run(id, f) => {
if let Some(handle) = window_manager.get_mut(id) {
f(handle);
}
}