fix cursor active in portable service, update peer input cursor time
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
5dc83359a5
commit
3aabd8f5ae
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user