Merge pull request #6406 from fufesou/feat/virtual_display_privacy_mode

Feat/Windows - virtual display privacy mode
This commit is contained in:
RustDesk
2023-11-14 21:54:14 +08:00
committed by GitHub
69 changed files with 2283 additions and 982 deletions

View File

@@ -378,19 +378,6 @@ pub fn update_clipboard(clipboard: Clipboard, old: Option<&Arc<Mutex<String>>>)
}
}
pub async fn send_opts_after_login(
config: &crate::client::LoginConfigHandler,
peer: &mut FramedStream,
) {
if let Some(opts) = config.get_option_message_after_login() {
let mut misc = Misc::new();
misc.set_option(opts);
let mut msg_out = Message::new();
msg_out.set_misc(misc);
allow_err!(peer.send(&msg_out).await);
}
}
#[cfg(feature = "use_rubato")]
pub fn resample_channels(
data: &[f32],
@@ -1070,10 +1057,12 @@ pub async fn post_request_sync(url: String, body: String, header: &str) -> Resul
pub fn make_privacy_mode_msg_with_details(
state: back_notification::PrivacyModeState,
details: String,
impl_key: String,
) -> Message {
let mut misc = Misc::new();
let mut back_notification = BackNotification {
details,
impl_key,
..Default::default()
};
back_notification.set_privacy_mode_state(state);
@@ -1084,8 +1073,8 @@ pub fn make_privacy_mode_msg_with_details(
}
#[inline]
pub fn make_privacy_mode_msg(state: back_notification::PrivacyModeState) -> Message {
make_privacy_mode_msg_with_details(state, "".to_owned())
pub fn make_privacy_mode_msg(state: back_notification::PrivacyModeState, impl_key: String) -> Message {
make_privacy_mode_msg_with_details(state, "".to_owned(), impl_key)
}
pub fn is_keyboard_mode_supported(