mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
18
src/ui.rs
18
src/ui.rs
@@ -13,9 +13,9 @@ use hbb_common::{
|
||||
log,
|
||||
};
|
||||
|
||||
use crate::common::get_app_name;
|
||||
use crate::ipc;
|
||||
use crate::ui_interface::*;
|
||||
#[cfg(not(any(feature = "flutter", feature = "cli")))]
|
||||
use crate::ui_session_interface::Session;
|
||||
use crate::{common::get_app_name, ipc, ui_interface::*};
|
||||
|
||||
mod cm;
|
||||
#[cfg(feature = "inline")]
|
||||
@@ -35,6 +35,11 @@ lazy_static::lazy_static! {
|
||||
static ref STUPID_VALUES: Mutex<Vec<Arc<Vec<Value>>>> = Default::default();
|
||||
}
|
||||
|
||||
#[cfg(not(any(feature = "flutter", feature = "cli")))]
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref CUR_SESSION: Arc<Mutex<Option<Session<remote::SciterHandler>>>> = Default::default();
|
||||
}
|
||||
|
||||
struct UIHostHandler;
|
||||
|
||||
pub fn start(args: &mut [String]) {
|
||||
@@ -119,9 +124,10 @@ pub fn start(args: &mut [String]) {
|
||||
frame.register_behavior("native-remote", move || {
|
||||
let handler =
|
||||
remote::SciterSession::new(cmd.clone(), id.clone(), pass.clone(), args.clone());
|
||||
#[cfg(not(feature = "flutter"))]
|
||||
crate::keyboard::set_cur_session(handler.inner());
|
||||
|
||||
#[cfg(not(any(feature = "flutter", feature = "cli")))]
|
||||
{
|
||||
*CUR_SESSION.lock().unwrap() = Some(handler.inner());
|
||||
}
|
||||
Box::new(handler)
|
||||
});
|
||||
page = "remote.html";
|
||||
|
||||
Reference in New Issue
Block a user