mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix cursor active in portable service, update peer input cursor time
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -671,6 +671,11 @@ fn fix_modifiers(modifiers: &[EnumOrUnknown<ControlKey>], en: &mut Enigo, ck: i3
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn update_latest_input_cursor_time() {
|
||||
LATEST_PEER_INPUT_CURSOR.lock().unwrap().time = get_time();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_last_input_cursor_pos() -> (i32, i32) {
|
||||
let lock = LATEST_PEER_INPUT_CURSOR.lock().unwrap();
|
||||
|
||||
@@ -903,6 +903,7 @@ pub mod client {
|
||||
|
||||
pub fn handle_mouse(evt: &MouseEvent, conn: i32) {
|
||||
if RUNNING.lock().unwrap().clone() {
|
||||
crate::input_service::update_latest_input_cursor_time();
|
||||
handle_mouse_(evt, conn).ok();
|
||||
} else {
|
||||
crate::input_service::handle_mouse_(evt, conn);
|
||||
|
||||
Reference in New Issue
Block a user