You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On macOS 26.5.1 (25F80), Window.setTheme('dark'|'light') (and app.setTheme) resolves successfully but the standard title bar never repaints in a Tauri 2.11.2 app — while the identical underlying call works correctly in a raw tao 0.35.3 + wry 0.55.1 program on the same machine.
Evidence gathered before filing:
The IPC resolves (no capability error; core:window:allow-set-theme granted).
The appearance override IS applied at the AppKit level: inside the webview, matchMedia('(prefers-color-scheme: dark)') flips in lockstep with setTheme — so NSApplication.setAppearance took effect and reached the view hierarchy. Only the window-server-drawn standard title bar stays in the OS appearance.
window.theme() is not usable as verification: tao returns the optimistically cached shared_state.current_theme (set by set_theme itself), and the KVO handler suppresses ThemeChanged when the cache already matches.
Not the fix(macos): run app.set_theme on main thread #13443 class: in 2.11.2 the window set_theme is dispatched through the event-loop proxy (tauri-runtime-wry lib.rs:2528 → :3675) and runs on the main thread; app.setTheme behaves identically to window.setTheme here (both resolve, neither repaints the bar).
Single-variable bisection (all on the same machine, human-observed):
Configuration
Standard title bar follows setTheme?
tao 0.35.3, bare binary
✅ flips
tao + embedded Info.plist
✅ flips
tao + Info.plist + wry 0.55.1 WKWebView attached (goes through wry's setTitlebarSeparatorStyle path)
✅ flips
minimal Tauri 2.11.2 (default config, static HTML, no plugins, withGlobalTauri)
❌ never flips (setTheme resolves on-screen)
So the regression surface is bracketed inside tauri/tauri-runtime-wry window/event-loop wiring, between raw tao+wry and a default Tauri app.
Reproduction
Minimal Tauri app (fails — bar never flips; src/main.rs is just tauri::Builder::default().run(tauri::generate_context!())):
<script>constw=window.__TAURI__.window.getCurrentWindow();letthemes=['dark','light','dark','light','dark','light','dark','light'],i=0;consttick=async()=>{if(i>=themes.length)return;constt=themes[i++];try{awaitw.setTheme(t);document.body.textContent='setTheme '+t+' OK ('+i+'/8)';}catch(e){document.body.textContent='setTheme FAILED: '+e;}setTimeout(tick,4000);};setTimeout(tick,4000);</script>
Control program (works — bar flips every cycle; same behavior with an Info.plist embedded via -sectcreate and with a wry 0.55.1 webview attached via WebViewBuilder::new().with_url("about:blank").build(&window)):
Describe the bug
On macOS 26.5.1 (25F80),
Window.setTheme('dark'|'light')(andapp.setTheme) resolves successfully but the standard title bar never repaints in a Tauri 2.11.2 app — while the identical underlying call works correctly in a raw tao 0.35.3 + wry 0.55.1 program on the same machine.Evidence gathered before filing:
core:window:allow-set-themegranted).matchMedia('(prefers-color-scheme: dark)')flips in lockstep withsetTheme— soNSApplication.setAppearancetook effect and reached the view hierarchy. Only the window-server-drawn standard title bar stays in the OS appearance.window.theme()is not usable as verification: tao returns the optimistically cachedshared_state.current_theme(set byset_themeitself), and the KVO handler suppressesThemeChangedwhen the cache already matches.app.set_themeon main thread #13443 class: in 2.11.2 the windowset_themeis dispatched through the event-loop proxy (tauri-runtime-wrylib.rs:2528→:3675) and runs on the main thread;app.setThemebehaves identically towindow.setThemehere (both resolve, neither repaints the bar).setTitlebarSeparatorStylepath)withGlobalTauri)So the regression surface is bracketed inside
tauri/tauri-runtime-wrywindow/event-loop wiring, between raw tao+wry and a default Tauri app.Reproduction
Minimal Tauri app (fails — bar never flips;
src/main.rsis justtauri::Builder::default().run(tauri::generate_context!())):tauri.conf.json:{ "productName": "tauri-min", "version": "0.1.0", "identifier": "com.diag.taurimin", "build": { "frontendDist": "./dist" }, "app": { "withGlobalTauri": true, "windows": [ { "title": "TAURI MIN", "width": 700, "height": 400 } ] }, "bundle": { "active": false } }capability:
{ "identifier": "default", "windows": ["main"], "permissions": ["core:default", "core:window:allow-set-theme"] }dist/index.html:Control program (works — bar flips every cycle; same behavior with an Info.plist embedded via
-sectcreateand with a wry 0.55.1 webview attached viaWebViewBuilder::new().with_url("about:blank").build(&window)):Expected behavior
The standard macOS title bar follows
setTheme, as it does in the raw tao 0.35.3 + wry 0.55.1 control on the same OS.Full
tauri info(Happy to run further bisection builds — the two repro programs above bracket the defect.)