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

@@ -69,3 +69,19 @@ pub trait TraitCapturer {
pub fn is_x11() -> bool {
"x11" == hbb_common::platform::linux::get_display_server()
}
#[cfg(x11)]
#[inline]
pub fn is_cursor_embeded() -> bool {
if is_x11() {
x11::IS_CURSOR_EMBEDED
} else {
wayland::IS_CURSOR_EMBEDED
}
}
#[cfg(not(x11))]
#[inline]
pub fn is_cursor_embeded() -> bool {
false
}