mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 23:19:02 +08:00
support linux mouse back/forward
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
97cf85d1b7
commit
b4feae33bb
@ -57,6 +57,8 @@ fn mousebutton(button: MouseButton) -> c_int {
|
||||
MouseButton::ScrollDown => 5,
|
||||
MouseButton::ScrollLeft => 6,
|
||||
MouseButton::ScrollRight => 7,
|
||||
MouseButton::Back => 8,
|
||||
MouseButton::Forward => 9,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,10 @@ impl MouseControllable for Enigo {
|
||||
MouseButton::Left => (CGMouseButton::Left, CGEventType::LeftMouseDown),
|
||||
MouseButton::Middle => (CGMouseButton::Center, CGEventType::OtherMouseDown),
|
||||
MouseButton::Right => (CGMouseButton::Right, CGEventType::RightMouseDown),
|
||||
_ => unimplemented!(),
|
||||
_ => {
|
||||
log::info!("Unsupported button {:?}", button);
|
||||
return Ok(());
|
||||
},
|
||||
};
|
||||
let dest = CGPoint::new(current_x as f64, current_y as f64);
|
||||
if let Some(src) = self.event_source.as_ref() {
|
||||
@ -249,7 +252,10 @@ impl MouseControllable for Enigo {
|
||||
MouseButton::Left => (CGMouseButton::Left, CGEventType::LeftMouseUp),
|
||||
MouseButton::Middle => (CGMouseButton::Center, CGEventType::OtherMouseUp),
|
||||
MouseButton::Right => (CGMouseButton::Right, CGEventType::RightMouseUp),
|
||||
_ => unimplemented!(),
|
||||
_ => {
|
||||
log::info!("Unsupported button {:?}", button);
|
||||
return;
|
||||
},
|
||||
};
|
||||
let dest = CGPoint::new(current_x as f64, current_y as f64);
|
||||
if let Some(src) = self.event_source.as_ref() {
|
||||
|
Loading…
Reference in New Issue
Block a user