mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
listen flutter key event when there's no input monitor permission
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use crate::common::get_default_sound_input;
|
||||
use crate::{
|
||||
client::file_trait::FileManager,
|
||||
common::make_fd_to_json,
|
||||
common::is_keyboard_mode_supported,
|
||||
common::make_fd_to_json,
|
||||
flutter::{self, SESSIONS},
|
||||
flutter::{session_add, session_start_},
|
||||
ui_interface::{self, *},
|
||||
};
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use crate::common::get_default_sound_input;
|
||||
use flutter_rust_bridge::{StreamSink, SyncReturn};
|
||||
use hbb_common::{
|
||||
config::{self, LocalConfig, PeerConfig, ONLINE},
|
||||
@@ -1181,6 +1181,9 @@ pub fn main_start_grab_keyboard() -> SyncReturn<bool> {
|
||||
return SyncReturn(false);
|
||||
}
|
||||
crate::keyboard::client::start_grab_loop();
|
||||
if !is_can_input_monitoring(false) {
|
||||
return SyncReturn(false);
|
||||
}
|
||||
SyncReturn(true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user