wayland cursor embeded

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-11-29 16:36:35 +08:00
parent e13e0ab18f
commit 4d044ca57a
18 changed files with 152 additions and 82 deletions

View File

@@ -74,6 +74,10 @@ fn is_capturer_mag_supported() -> bool {
false
}
pub fn capture_cursor_embeded() -> bool {
scrap::is_cursor_embeded()
}
pub fn notify_video_frame_feched(conn_id: i32, frame_tm: Option<Instant>) {
FRAME_FETCHED_NOTIFIER.0.send((conn_id, frame_tm)).unwrap()
}
@@ -455,6 +459,7 @@ fn run(sp: GenericService) -> ResultType<()> {
y: c.origin.1 as _,
width: c.width as _,
height: c.height as _,
cursor_embeded: capture_cursor_embeded(),
..Default::default()
});
let mut msg_out = Message::new();
@@ -783,6 +788,7 @@ pub(super) fn get_displays_2(all: &Vec<Display>) -> (usize, Vec<DisplayInfo>) {
height: d.height() as _,
name: d.name(),
online: d.is_online(),
cursor_embeded: false,
..Default::default()
});
}

View File

@@ -127,7 +127,10 @@ pub(super) async fn check_init() -> ResultType<()> {
if *lock == 0 {
let all = Display::all()?;
let num = all.len();
let (primary, displays) = super::video_service::get_displays_2(&all);
let (primary, mut displays) = super::video_service::get_displays_2(&all);
for display in displays.iter_mut() {
display.cursor_embeded = true;
}
let mut rects: Vec<((i32, i32), usize, usize)> = Vec::new();
for d in &all {