port commits since fork

macos-click-through
Keith Simmons 4 years ago
parent b29dff8db7
commit 5da81b4f26

@ -109,6 +109,21 @@ fn main() {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
{ {
// incase of app bundle, we can just pass --disowned option straight away to bypass this check
#[cfg(not(debug_assertions))]
if !std::env::args().any(|f| f == "--disowned") {
if let Ok(curr_exe) = std::env::current_exe() {
assert!(std::process::Command::new(curr_exe)
.args(std::env::args().skip(1))
.arg("--disowned")
.spawn()
.is_ok());
std::process::exit(0);
} else {
eprintln!("error in disowning process, cannot obtain the path for the current executable, continuing without disowning...");
}
}
use std::env; use std::env;
if env::var_os("TERM").is_none() { if env::var_os("TERM").is_none() {
let mut profile_path = dirs::home_dir().unwrap(); let mut profile_path = dirs::home_dir().unwrap();

@ -73,7 +73,10 @@ impl ExtendedFontFamily {
let font = &handle.font; let font = &handle.font;
let properties = font.properties(); let properties = font.properties();
if properties.weight == props.weight && properties.style == props.style { if properties.weight == props.weight
&& properties.style == props.style
&& properties.stretch == props.stretch
{
return Some(&font); return Some(&font);
} }
} }

@ -68,8 +68,17 @@ impl Settings {
if arg == "--log" { if arg == "--log" {
log_to_file = true; log_to_file = true;
false false
} else if arg == "--version" || arg == "-v" {
println!("Neovide version: {}", env!("CARGO_PKG_VERSION"));
std::process::exit(0);
} else if arg == "--help" || arg == "-h" {
println!("neovide: {}", env!("CARGO_PKG_DESCRIPTION"));
std::process::exit(0);
} else { } else {
!(arg.starts_with("--geometry=") || arg == "--wsl" || arg == "--multiGrid") !(arg.starts_with("--geometry=")
|| arg == "--wsl"
|| arg == "--disowned"
|| arg == "--multiGrid")
} }
}) })
.collect::<Vec<String>>(); .collect::<Vec<String>>();

Loading…
Cancel
Save