init wayland to update var 'cursor embeded'

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-01-28 22:19:28 +08:00
parent 7e0c9e17df
commit b84f3ba1ee
5 changed files with 28 additions and 7 deletions

View File

@@ -52,7 +52,7 @@ pub fn global_init() -> bool {
#[cfg(target_os = "linux")]
{
if !*IS_X11 {
crate::server::wayland::set_wayland_scrap_map_err();
crate::server::wayland::init();
}
}
true

View File

@@ -1,6 +1,6 @@
use super::*;
use hbb_common::{allow_err, platform::linux::DISTRO};
use scrap::{set_map_err, Capturer, Display, Frame, TraitCapturer};
use scrap::{detect_cursor_embeded, set_map_err, Capturer, Display, Frame, TraitCapturer};
use std::io;
use super::video_service::{
@@ -12,7 +12,8 @@ lazy_static::lazy_static! {
static ref LOG_SCRAP_COUNT: Mutex<u32> = Mutex::new(0);
}
pub fn set_wayland_scrap_map_err() {
pub fn init() {
detect_cursor_embeded();
set_map_err(map_err_scrap);
}