Revert "linux tray as mac tray"

This commit is contained in:
RustDesk
2023-06-25 00:45:33 +08:00
committed by GitHub
parent 2a7a96429d
commit f635453e80
4 changed files with 5 additions and 8 deletions

View File

@@ -12,17 +12,17 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
TrayEvent, TrayIconBuilder,
};
let icon;
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_os = "macos")]
{
let mode = dark_light::detect();
const LIGHT: &[u8] = include_bytes!("../res/outlined-tray-light-x2.png");
const DARK: &[u8] = include_bytes!("../res/outlined-tray-dark-x2.png");
const LIGHT: &[u8] = include_bytes!("../res/mac-tray-light-x2.png");
const DARK: &[u8] = include_bytes!("../res/mac-tray-dark-x2.png");
icon = match mode {
dark_light::Mode::Dark => LIGHT,
_ => DARK,
};
}
#[cfg(target_os = "windows")]
#[cfg(not(target_os = "macos"))]
{
icon = include_bytes!("../res/tray-icon.ico");
}
@@ -74,7 +74,6 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
.spawn()
.ok();
}
// xdg-open?
#[cfg(target_os = "linux")]
if !std::process::Command::new("xdg-open")
.arg("rustdesk://")