mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
update rdev, fix grab system utf8, fallback on linux
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -583,6 +583,8 @@ pub fn event_type_to_event(event_type: EventType) -> Event {
|
||||
unicode: None,
|
||||
platform_code: 0,
|
||||
position_code: 0,
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
extra_data: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -676,10 +676,10 @@ impl Connection {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
fn handle_input(receiver: std_mpsc::Receiver<MessageInput>, tx: Sender) {
|
||||
let mut block_input_mode = false;
|
||||
#[cfg(target_os = "windows")]
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
{
|
||||
rdev::set_dw_mouse_extra_info(enigo::ENIGO_INPUT_EXTRA_VALUE);
|
||||
rdev::set_dw_keyboard_extra_info(enigo::ENIGO_INPUT_EXTRA_VALUE);
|
||||
rdev::set_mouse_extra_info(enigo::ENIGO_INPUT_EXTRA_VALUE);
|
||||
rdev::set_keyboard_extra_info(enigo::ENIGO_INPUT_EXTRA_VALUE);
|
||||
}
|
||||
#[cfg(target_os = "macos")]
|
||||
reset_input_ondisconn();
|
||||
|
||||
@@ -380,6 +380,9 @@ pub fn try_stop_record_cursor_pos() {
|
||||
return;
|
||||
}
|
||||
RECORD_CURSOR_POS_RUNNING.store(false, Ordering::SeqCst);
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
let _r = rdev::exit_grab();
|
||||
}
|
||||
|
||||
// mac key input must be run in main thread, otherwise crash on >= osx 10.15
|
||||
|
||||
@@ -660,6 +660,8 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
platform_code,
|
||||
position_code: position_code as _,
|
||||
event_type,
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
extra_data: 0,
|
||||
};
|
||||
keyboard::client::process_event(&event, Some(lock_modes));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user