diff --git a/.changes/fix-macos-theme-getter.md b/.changes/fix-macos-theme-getter.md new file mode 100644 index 000000000..47dd2da75 --- /dev/null +++ b/.changes/fix-macos-theme-getter.md @@ -0,0 +1,5 @@ +--- +"tauri-runtime-wry": patch +--- + +Send theme value only once on the getter function implementation on macOS. diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 8932d66e3..a5709139f 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -2299,7 +2299,7 @@ fn handle_user_message( WindowMessage::Theme(tx) => { #[cfg(any(windows, target_os = "macos"))] tx.send(map_theme(&window.theme())).unwrap(); - #[cfg(not(windows))] + #[cfg(not(any(windows, target_os = "macos")))] tx.send(Theme::Light).unwrap(); } // Setters