mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-17 18:21:02 +03:00
@@ -115,6 +115,8 @@ enum MessageInput {
|
||||
Mouse((MouseEvent, i32)),
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
Key((KeyEvent, bool)),
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
Pointer((PointerDeviceEvent, i32)),
|
||||
BlockOn,
|
||||
BlockOff,
|
||||
#[cfg(all(feature = "flutter", feature = "plugin_framework"))]
|
||||
@@ -668,6 +670,9 @@ impl Connection {
|
||||
handle_key(&msg);
|
||||
}
|
||||
}
|
||||
MessageInput::Pointer((msg, id)) => {
|
||||
handle_pointer(&msg, id);
|
||||
}
|
||||
MessageInput::BlockOn => {
|
||||
if crate::platform::block_input(true) {
|
||||
block_input_mode = true;
|
||||
@@ -1179,6 +1184,12 @@ impl Connection {
|
||||
self.tx_input.send(MessageInput::Mouse((msg, conn_id))).ok();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
fn input_pointer(&self, msg: PointerDeviceEvent, conn_id: i32) {
|
||||
self.tx_input.send(MessageInput::Pointer((msg, conn_id))).ok();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
fn input_key(&self, msg: KeyEvent, press: bool) {
|
||||
@@ -1577,6 +1588,13 @@ impl Connection {
|
||||
self.input_mouse(me, self.inner.id());
|
||||
}
|
||||
}
|
||||
Some(message::Union::PointerDeviceEvent(pde)) => {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
if self.peer_keyboard_enabled() {
|
||||
MOUSE_MOVE_TIME.store(get_time(), Ordering::SeqCst);
|
||||
self.input_pointer(pde, self.inner.id());
|
||||
}
|
||||
}
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
Some(message::Union::KeyEvent(..)) => {}
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
|
||||
Reference in New Issue
Block a user