mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Merge pull request #1327 from Heap-Hop/flutter_desktop_cm
Flutter desktop cm
This commit is contained in:
@@ -41,6 +41,7 @@ use crate::{client::*, flutter_ffi::EventToUI, make_fd_flutter};
|
||||
pub(super) const APP_TYPE_MAIN: &str = "main";
|
||||
pub(super) const APP_TYPE_DESKTOP_REMOTE: &str = "remote";
|
||||
pub(super) const APP_TYPE_DESKTOP_FILE_TRANSFER: &str = "file transfer";
|
||||
pub(super) const APP_TYPE_DESKTOP_CONNECTION_MANAGER: &str = "connection manager";
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
// static ref SESSION: Arc<RwLock<Option<Session>>> = Default::default();
|
||||
@@ -1675,6 +1676,8 @@ pub mod connection_manager {
|
||||
keyboard: bool,
|
||||
clipboard: bool,
|
||||
audio: bool,
|
||||
file: bool,
|
||||
restart: bool,
|
||||
#[serde(skip)]
|
||||
tx: UnboundedSender<Data>,
|
||||
}
|
||||
@@ -1885,8 +1888,8 @@ pub mod connection_manager {
|
||||
keyboard: bool,
|
||||
clipboard: bool,
|
||||
audio: bool,
|
||||
_file: bool,
|
||||
_restart: bool,
|
||||
file: bool,
|
||||
restart: bool,
|
||||
tx: mpsc::UnboundedSender<Data>,
|
||||
) {
|
||||
let mut client = Client {
|
||||
@@ -1898,6 +1901,8 @@ pub mod connection_manager {
|
||||
keyboard,
|
||||
clipboard,
|
||||
audio,
|
||||
file,
|
||||
restart,
|
||||
tx,
|
||||
};
|
||||
if authorized {
|
||||
@@ -1935,7 +1940,7 @@ pub mod connection_manager {
|
||||
if let Some(s) = GLOBAL_EVENT_STREAM
|
||||
.read()
|
||||
.unwrap()
|
||||
.get(super::APP_TYPE_MAIN)
|
||||
.get(super::APP_TYPE_DESKTOP_CONNECTION_MANAGER)
|
||||
{
|
||||
s.add(serde_json::ser::to_string(&h).unwrap_or("".to_owned()));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user