Fix wayland input after Lock and Wake

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-11-25 15:22:44 +08:00
parent e31130d4f8
commit 9dfa02a702
9 changed files with 159 additions and 36 deletions

View File

@@ -759,6 +759,16 @@ 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;