Skip to content

Commit

Permalink
Merge pull request #215 from rainlanguage/2024-02-09-tauri-set-env-linux
Browse files Browse the repository at this point in the history
feat(tauri): set WEBKIT_DISABLE_COMPOSITING_MODE=1 on linux
  • Loading branch information
thedavidmeister authored Feb 10, 2024
2 parents 04774b6 + e93d2d0 commit af2c410
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tauri-app/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ use commands::order_clear::{order_clears_list, order_clears_list_write_csv};
use commands::wallet::get_address_from_ledger;

fn main() {
if std::env::consts::OS == "linux" {
// Disable webkitgtk Accelerated Compositing to avoid a blank screen
// See https://github.com/tauri-apps/tauri/issues/5143
std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1");
run_tauri_app();
std::env::remove_var("WEBKIT_DISABLE_COMPOSITING_MODE");
} else {
run_tauri_app();
}
}

fn run_tauri_app() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![
vaults_list,
Expand All @@ -43,4 +55,4 @@ fn main() {
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
}

0 comments on commit af2c410

Please sign in to comment.