Merge branch 'master' into keyboard-shortcuts

This commit is contained in:
fufesou
2026-10-04 00:05:51 -07:00
60 changed files with 6716 additions and 469 deletions
+14
View File
@@ -51,6 +51,10 @@ use crate::common::GrabState;
use crate::keyboard;
use crate::{client::Data, client::Interface};
#[cfg(any(target_os = "android", target_os = "ios", test))]
#[path = "platform/mobile_wheel.rs"]
mod mobile_wheel;
const CHANGE_RESOLUTION_VALID_TIMEOUT_SECS: u64 = 15;
#[derive(Clone, Default)]
@@ -72,6 +76,10 @@ pub struct Session<T: InvokeUiSession> {
pub reconnect_count: Arc<AtomicUsize>,
pub last_audit_note: Arc<Mutex<String>>,
pub audit_guid: Arc<Mutex<String>>,
// Every cursor shape as the peer sent it, compressed, by the id the UI knows it by. The
// peer sends a shape once, and a window asks for it whenever it has to draw it again.
#[cfg(feature = "flutter")]
pub cursor_shapes: Arc<RwLock<HashMap<u64, CursorData>>>,
}
#[derive(Clone)]
@@ -1253,6 +1261,12 @@ impl<T: InvokeUiSession> Session<T> {
} else {
(x, y)
};
#[cfg(any(target_os = "android", target_os = "ios"))]
let (x, y) = if event_type == MOUSE_TYPE_WHEEL || event_type == MOUSE_TYPE_TRACKPAD {
mobile_wheel::mobile_wheel_delta((x, y), &self.lc.read().unwrap().reverse_mouse_wheel)
} else {
(x, y)
};
// #[cfg(not(any(target_os = "android", target_os = "ios")))]
let (alt, ctrl, shift, command) =