From 0b78f2aa5d0a741da79f3b2b0a91046c32587403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 16 Oct 2025 02:43:29 +0200 Subject: [PATCH] Run `mundy` inside `Runtime` context in `iced_winit` --- winit/src/lib.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/winit/src/lib.rs b/winit/src/lib.rs index fc84f931..73f22aa2 100644 --- a/winit/src/lib.rs +++ b/winit/src/lib.rs @@ -540,12 +540,15 @@ async fn run_instance

( .boxed(), ); - mundy::Preferences::once_blocking( - mundy::Interest::ColorScheme, - core::time::Duration::from_millis(200), - ) - .map(|preferences| to_mode(preferences.color_scheme)) - .unwrap_or_default() + runtime + .enter(|| { + mundy::Preferences::once_blocking( + mundy::Interest::ColorScheme, + core::time::Duration::from_millis(200), + ) + }) + .map(|preferences| to_mode(preferences.color_scheme)) + .unwrap_or_default() }; #[cfg(not(all(feature = "linux-theme-detection", target_os = "linux")))]