File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -616,8 +616,16 @@ fn main() {
616616 let ( output_tx, mut output_rx) = mpsc:: unbounded_channel :: < TerminalOutput > ( ) ;
617617 let ( file_event_tx, mut file_event_rx) = mpsc:: unbounded_channel :: < FileEvent > ( ) ;
618618
619- // Enable GPU acceleration
620- std:: env:: set_var ( "WEBKIT_DISABLE_COMPOSITING_MODE" , "0" ) ;
619+ // Linux desktop sessions can show a blank/white window when WebKit compositing
620+ // is forced on under some Wayland/XWayland setups. Respect any explicit user
621+ // override and otherwise prefer the safer default on Linux.
622+ if std:: env:: var_os ( "WEBKIT_DISABLE_COMPOSITING_MODE" ) . is_none ( ) {
623+ #[ cfg( target_os = "linux" ) ]
624+ std:: env:: set_var ( "WEBKIT_DISABLE_COMPOSITING_MODE" , "1" ) ;
625+
626+ #[ cfg( not( target_os = "linux" ) ) ]
627+ std:: env:: set_var ( "WEBKIT_DISABLE_COMPOSITING_MODE" , "0" ) ;
628+ }
621629
622630 tauri:: Builder :: default ( )
623631 . plugin ( tauri_plugin_shell:: init ( ) )
You can’t perform that action at this time.
0 commit comments