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.
|
// Update time to avoid send cursor position event to the peer.
|
||||||
// See `run_pos` --> `set_cursor_position` --> `exclude`
|
// See `run_pos` --> `set_cursor_position` --> `exclude`
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn update_latest_input_cursor_time() {
|
pub fn update_latest_input_cursor_time(conn: i32) {
|
||||||
LATEST_PEER_INPUT_CURSOR.lock().unwrap().time = get_time();
|
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]
|
#[inline]
|
||||||
|
@ -903,7 +903,7 @@ pub mod client {
|
|||||||
|
|
||||||
pub fn handle_mouse(evt: &MouseEvent, conn: i32) {
|
pub fn handle_mouse(evt: &MouseEvent, conn: i32) {
|
||||||
if RUNNING.lock().unwrap().clone() {
|
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();
|
handle_mouse_(evt, conn).ok();
|
||||||
} else {
|
} else {
|
||||||
crate::input_service::handle_mouse_(evt, conn);
|
crate::input_service::handle_mouse_(evt, conn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user