fix user login state
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
fea9cfba7f
commit
96d95fa08a
12 changed files with 182 additions and 81 deletions
|
|
@ -63,6 +63,10 @@ lazy_static::lazy_static! {
|
|||
static ref SWITCH_SIDES_UUID: Arc::<Mutex<HashMap<String, (Instant, uuid::Uuid)>>> = Default::default();
|
||||
}
|
||||
pub static CLICK_TIME: AtomicI64 = AtomicI64::new(0);
|
||||
#[cfg(all(
|
||||
not(any(target_os = "android", target_os = "ios")),
|
||||
feature = "flutter"
|
||||
))]
|
||||
pub static MOUSE_MOVE_TIME: AtomicI64 = AtomicI64::new(0);
|
||||
|
||||
#[cfg(all(feature = "flutter", feature = "plugin_framework"))]
|
||||
|
|
@ -163,6 +167,7 @@ pub struct Connection {
|
|||
// by peer
|
||||
disable_audio: bool,
|
||||
// by peer
|
||||
#[cfg(windows)]
|
||||
enable_file_transfer: bool,
|
||||
// by peer
|
||||
audio_sender: Option<MediaSender>,
|
||||
|
|
@ -291,6 +296,7 @@ impl Connection {
|
|||
show_remote_cursor: false,
|
||||
ip: "".to_owned(),
|
||||
disable_audio: false,
|
||||
#[cfg(windows)]
|
||||
enable_file_transfer: false,
|
||||
disable_clipboard: false,
|
||||
disable_keyboard: false,
|
||||
|
|
@ -1112,6 +1118,7 @@ impl Connection {
|
|||
self.audio && !self.disable_audio
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn file_transfer_enabled(&self) -> bool {
|
||||
self.file && self.enable_file_transfer
|
||||
}
|
||||
|
|
@ -1563,6 +1570,10 @@ impl Connection {
|
|||
if is_left_up(&me) {
|
||||
CLICK_TIME.store(get_time(), Ordering::SeqCst);
|
||||
} else {
|
||||
#[cfg(all(
|
||||
not(any(target_os = "android", target_os = "ios")),
|
||||
feature = "flutter"
|
||||
))]
|
||||
MOUSE_MOVE_TIME.store(get_time(), Ordering::SeqCst);
|
||||
}
|
||||
self.input_mouse(me, self.inner.id());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue