Skip to content

Commit 63841c1

Browse files
authored
fix(tauri-runtime-wry): do not send theme twice on macOS, closes #4532 (#4540)
1 parent 185b0e3 commit 63841c1

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changes/fix-macos-theme-getter.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-runtime-wry": patch
3+
---
4+
5+
Send theme value only once on the getter function implementation on macOS.

core/tauri-runtime-wry/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2299,7 +2299,7 @@ fn handle_user_message<T: UserEvent>(
22992299
WindowMessage::Theme(tx) => {
23002300
#[cfg(any(windows, target_os = "macos"))]
23012301
tx.send(map_theme(&window.theme())).unwrap();
2302-
#[cfg(not(windows))]
2302+
#[cfg(not(any(windows, target_os = "macos")))]
23032303
tx.send(Theme::Light).unwrap();
23042304
}
23052305
// Setters

0 commit comments

Comments
 (0)