fix: crash, drop tokio RunTime in async context (#9091)

* fix: crash, drop tokio RunTime in async context

Signed-off-by: fufesou <linlong1266@gmail.com>

* chore

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-08-16 14:55:42 +08:00
committed by GitHub
parent ed18e3c786
commit f31e60af5b
4 changed files with 47 additions and 31 deletions

View File

@@ -1636,6 +1636,18 @@ async fn send_sas() -> ResultType<()> {
Ok(())
}
#[inline]
#[cfg(target_os = "linux")]
pub fn wayland_use_uinput() -> bool {
!crate::platform::is_x11() && crate::is_server()
}
#[inline]
#[cfg(target_os = "linux")]
pub fn wayland_use_rdp_input() -> bool {
!crate::platform::is_x11() && !crate::is_server()
}
lazy_static::lazy_static! {
static ref MODIFIER_MAP: HashMap<i32, Key> = [
(ControlKey::Alt, Key::Alt),