File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : " patch:bug"
3+ ---
4+
5+ Fixed set_window_effects not runs on main thread in WindowBuilder.
Original file line number Diff line number Diff line change @@ -406,14 +406,14 @@ tauri::Builder::default()
406406 window. on_menu_event ( handler) ;
407407 }
408408
409- if let Some ( effects) = self . window_effects {
410- crate :: vibrancy:: set_window_effects ( & window, Some ( effects) ) ?;
411- }
412-
413409 let app_manager = self . manager . manager_owned ( ) ;
414410 let window_label = window. label ( ) . to_string ( ) ;
411+ let window_ = window. clone ( ) ;
415412 // run on the main thread to fix a deadlock on webview.eval if the tracing feature is enabled
416413 let _ = window. run_on_main_thread ( move || {
414+ if let Some ( effects) = self . window_effects {
415+ _ = crate :: vibrancy:: set_window_effects ( & window_, Some ( effects) ) ;
416+ }
417417 let event = crate :: EventName :: from_str ( "tauri://window-created" ) ;
418418 let payload = Some ( crate :: webview:: CreatedEvent {
419419 label : window_label,
You can’t perform that action at this time.
0 commit comments