fix on linux

This commit is contained in:
rustdesk
2021-05-02 21:19:48 +08:00
parent 547b85adbf
commit 2adc774d8a
5 changed files with 46 additions and 5 deletions

View File

@@ -17,6 +17,17 @@ pub mod linux;
use hbb_common::{message_proto::CursorData, ResultType};
const SERVICE_INTERVAL: u64 = 300;
pub fn is_xfce() -> bool {
#[cfg(target_os = "linux")]
{
return std::env::var_os("XDG_CURRENT_DESKTOP") == Some(std::ffi::OsString::from("XFCE"));
}
#[cfg(not(target_os = "linux"))]
{
return false;
}
}
#[cfg(test)]
mod tests {
use super::*;