Skip to content

Commit

Permalink
fix(gui, windows): Hide monero-wallet-rpc console window (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron authored Nov 14, 2024
1 parent e46be4a commit 9f4c28c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion swap/src/monero/wallet_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,18 @@ impl WalletRpc {
}
};

let mut child = Command::new(self.exec_path())
let mut command = Command::new(self.exec_path());

#[cfg(target_os = "windows")]
{
// See: https://learn.microsoft.com/de-de/windows/win32/procthread/process-creation-flags
// This prevents a console window from appearing when the wallet is started
use std::os::windows::process::CommandExt;
const CREATE_NO_WINDOW: u32 = 0x08000000;
command.creation_flags(CREATE_NO_WINDOW);
}

let mut child = command
.env("LANG", "en_AU.UTF-8")
.stdout(Stdio::piped())
.kill_on_drop(true)
Expand Down

0 comments on commit 9f4c28c

Please sign in to comment.