mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
wayalnd, do not share screen when no connections
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -660,6 +660,11 @@ fn run(sp: GenericService) -> ResultType<()> {
|
||||
std::thread::sleep(spf - elapsed);
|
||||
}
|
||||
}
|
||||
|
||||
if !scrap::is_x11() {
|
||||
super::wayland::release_resouce();
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -764,16 +769,6 @@ fn get_display_num() -> usize {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn check_init() -> ResultType<()> {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
if !scrap::is_x11() {
|
||||
return super::wayland::check_init().await;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) fn get_displays_2(all: &Vec<Display>) -> (usize, Vec<DisplayInfo>) {
|
||||
let mut displays = Vec::new();
|
||||
let mut primary = 0;
|
||||
|
||||
Reference in New Issue
Block a user