mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-21 09:33:01 +08:00
fix cursor active, portable service
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
a054c9520e
commit
4d16d9566a
@ -674,8 +674,11 @@ fn fix_modifiers(modifiers: &[EnumOrUnknown<ControlKey>], en: &mut Enigo, ck: i3
|
||||
// Update time to avoid send cursor position event to the peer.
|
||||
// See `run_pos` --> `set_cursor_position` --> `exclude`
|
||||
#[inline]
|
||||
pub fn update_latest_input_cursor_time() {
|
||||
LATEST_PEER_INPUT_CURSOR.lock().unwrap().time = get_time();
|
||||
pub fn update_latest_input_cursor_time(conn: i32) {
|
||||
log_fo_file(&format!("update_latest_input_cursor_time process id {}", std::process::id()));
|
||||
let mut lock = LATEST_PEER_INPUT_CURSOR.lock().unwrap();
|
||||
lock.conn = conn;
|
||||
lock.time = get_time();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -903,7 +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();
|
||||
crate::input_service::update_latest_input_cursor_time(conn);
|
||||
handle_mouse_(evt, conn).ok();
|
||||
} else {
|
||||
crate::input_service::handle_mouse_(evt, conn);
|
||||
|
Loading…
Reference in New Issue
Block a user