refact linux desktop env

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-03-28 22:20:15 +08:00
parent 5e79481860
commit 30375a9853
5 changed files with 250 additions and 449 deletions

View File

@@ -1,4 +1,3 @@
use super::linux_desktop::{get_desktop_env, Desktop};
use super::{CursorData, ResultType};
use desktop::Desktop;
pub use hbb_common::platform::linux::*;
@@ -297,6 +296,7 @@ fn force_stop_server() {
pub fn start_os_service() {
stop_rustdesk_servers();
start_uinput_service();
start_check_desktop_env();
let running = Arc::new(AtomicBool::new(true));
let r = running.clone();
@@ -371,6 +371,8 @@ pub fn start_os_service() {
}
}
stop_check_desktop_env();
if let Some(ps) = user_server.take().as_mut() {
allow_err!(ps.kill());
}