Merge pull request #4278 from fufesou/fix/cursor_active_portable_service
fix cursor active, portable service
This commit is contained in:
commit
1a3c6ce254
@ -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…
x
Reference in New Issue
Block a user