portable-service: little fix
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
9b3a3bde39
commit
2a65d948aa
3 changed files with 9 additions and 9 deletions
|
|
@ -280,13 +280,6 @@ fn get_modifier_state(key: Key, en: &mut Enigo) -> bool {
|
|||
}
|
||||
|
||||
pub fn handle_mouse(evt: &MouseEvent, conn: i32) {
|
||||
#[cfg(target_os = "macos")]
|
||||
if !*IS_SERVER {
|
||||
// having GUI, run main GUI thread, otherwise crash
|
||||
let evt = evt.clone();
|
||||
QUEUE.exec_async(move || handle_mouse_(&evt, conn));
|
||||
return;
|
||||
}
|
||||
if !active_mouse_(conn) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -300,6 +293,13 @@ pub fn handle_mouse(evt: &MouseEvent, conn: i32) {
|
|||
y: evt.y,
|
||||
};
|
||||
}
|
||||
#[cfg(target_os = "macos")]
|
||||
if !*IS_SERVER {
|
||||
// having GUI, run main GUI thread, otherwise crash
|
||||
let evt = evt.clone();
|
||||
QUEUE.exec_async(move || handle_mouse_(&evt));
|
||||
return;
|
||||
}
|
||||
#[cfg(windows)]
|
||||
crate::portable_service::client::handle_mouse(evt);
|
||||
#[cfg(not(windows))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue