wayland, fix check Lock && Mod Resolution

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-11-23 23:57:01 +08:00
parent fc89257566
commit e31130d4f8
3 changed files with 44 additions and 10 deletions

View File

@@ -599,18 +599,13 @@ fn run(sp: GenericService) -> ResultType<()> {
}
try_gdi += 1;
}
#[cfg(target_os = "linux")]
{
would_block_count += 1;
if !scrap::is_x11() {
if would_block_count >= 1000 {
// For now, the user should choose and agree screen sharing agiain.
// to-do: Remember choice, attendless...
// super::wayland::release_resouce();
// bail!("Wayland capturer none 100 times, try restart captuere");
log::error!("Wayland capturer none 1000 times, try restart captuere");
would_block_count = 0;
if would_block_count >= 100 {
super::wayland::release_resouce();
bail!("Wayland capturer none 100 times, try restart captuere");
}
}
}

View File

@@ -241,6 +241,7 @@ pub(super) fn get_display_num() -> ResultType<usize> {
}
}
#[allow(dead_code)]
pub(super) fn release_resouce() {
if scrap::is_x11() {
return;