disable init clipboard sync by default
This commit is contained in:
parent
b93d4ce3fc
commit
2e314bf032
@ -296,6 +296,8 @@ pub struct PeerConfig {
|
|||||||
pub keyboard_mode: String,
|
pub keyboard_mode: String,
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub view_only: ViewOnly,
|
pub view_only: ViewOnly,
|
||||||
|
#[serde(flatten)]
|
||||||
|
pub sync_init_clipboard: SyncInitClipboard,
|
||||||
// Mouse wheel or touchpad scroll mode
|
// Mouse wheel or touchpad scroll mode
|
||||||
#[serde(
|
#[serde(
|
||||||
default = "PeerConfig::default_reverse_mouse_wheel",
|
default = "PeerConfig::default_reverse_mouse_wheel",
|
||||||
@ -373,6 +375,7 @@ impl Default for PeerConfig {
|
|||||||
ui_flutter: Default::default(),
|
ui_flutter: Default::default(),
|
||||||
info: Default::default(),
|
info: Default::default(),
|
||||||
transfer: Default::default(),
|
transfer: Default::default(),
|
||||||
|
sync_init_clipboard: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1462,6 +1465,13 @@ serde_field_bool!(
|
|||||||
"ViewOnly::default_view_only"
|
"ViewOnly::default_view_only"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
serde_field_bool!(
|
||||||
|
SyncInitClipboard,
|
||||||
|
"sync-init-clipboard",
|
||||||
|
default_sync_init_clipboard,
|
||||||
|
"SyncInitClipboard::default_sync_init_clipboard"
|
||||||
|
);
|
||||||
|
|
||||||
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
||||||
pub struct LocalConfig {
|
pub struct LocalConfig {
|
||||||
#[serde(default, deserialize_with = "deserialize_string")]
|
#[serde(default, deserialize_with = "deserialize_string")]
|
||||||
@ -2156,6 +2166,7 @@ pub mod keys {
|
|||||||
pub const OPTION_CUSTOM_IMAGE_QUALITY: &str = "custom_image_quality";
|
pub const OPTION_CUSTOM_IMAGE_QUALITY: &str = "custom_image_quality";
|
||||||
pub const OPTION_CUSTOM_FPS: &str = "custom-fps";
|
pub const OPTION_CUSTOM_FPS: &str = "custom-fps";
|
||||||
pub const OPTION_CODEC_PREFERENCE: &str = "codec-preference";
|
pub const OPTION_CODEC_PREFERENCE: &str = "codec-preference";
|
||||||
|
pub const OPTION_SYNC_INIT_CLIPBOARD: &str = "sync-init-clipboard";
|
||||||
pub const OPTION_THEME: &str = "theme";
|
pub const OPTION_THEME: &str = "theme";
|
||||||
pub const OPTION_LANGUAGE: &str = "lang";
|
pub const OPTION_LANGUAGE: &str = "lang";
|
||||||
pub const OPTION_REMOTE_MENUBAR_DRAG_LEFT: &str = "remote-menubar-drag-left";
|
pub const OPTION_REMOTE_MENUBAR_DRAG_LEFT: &str = "remote-menubar-drag-left";
|
||||||
@ -2219,7 +2230,6 @@ pub mod keys {
|
|||||||
pub const OPTION_DEFAULT_CONNECT_PASSWORD: &str = "default-connect-password";
|
pub const OPTION_DEFAULT_CONNECT_PASSWORD: &str = "default-connect-password";
|
||||||
pub const OPTION_HIDE_TRAY: &str = "hide-tray";
|
pub const OPTION_HIDE_TRAY: &str = "hide-tray";
|
||||||
pub const OPTION_ONE_WAY_CLIPBOARD_REDIRECTION: &str = "one-way-clipboard-redirection";
|
pub const OPTION_ONE_WAY_CLIPBOARD_REDIRECTION: &str = "one-way-clipboard-redirection";
|
||||||
pub const OPTION_ENABLE_CLIPBOARD_INIT_SYNC: &str = "enable-clipboard-init-sync";
|
|
||||||
pub const OPTION_ALLOW_LOGON_SCREEN_PASSWORD: &str = "allow-logon-screen-password";
|
pub const OPTION_ALLOW_LOGON_SCREEN_PASSWORD: &str = "allow-logon-screen-password";
|
||||||
pub const OPTION_ONE_WAY_FILE_TRANSFER: &str = "one-way-file-transfer";
|
pub const OPTION_ONE_WAY_FILE_TRANSFER: &str = "one-way-file-transfer";
|
||||||
|
|
||||||
@ -2280,6 +2290,7 @@ pub mod keys {
|
|||||||
OPTION_CUSTOM_IMAGE_QUALITY,
|
OPTION_CUSTOM_IMAGE_QUALITY,
|
||||||
OPTION_CUSTOM_FPS,
|
OPTION_CUSTOM_FPS,
|
||||||
OPTION_CODEC_PREFERENCE,
|
OPTION_CODEC_PREFERENCE,
|
||||||
|
OPTION_SYNC_INIT_CLIPBOARD,
|
||||||
];
|
];
|
||||||
// DEFAULT_LOCAL_SETTINGS, OVERWRITE_LOCAL_SETTINGS
|
// DEFAULT_LOCAL_SETTINGS, OVERWRITE_LOCAL_SETTINGS
|
||||||
pub const KEYS_LOCAL_SETTINGS: &[&str] = &[
|
pub const KEYS_LOCAL_SETTINGS: &[&str] = &[
|
||||||
@ -2367,7 +2378,6 @@ pub mod keys {
|
|||||||
OPTION_DEFAULT_CONNECT_PASSWORD,
|
OPTION_DEFAULT_CONNECT_PASSWORD,
|
||||||
OPTION_HIDE_TRAY,
|
OPTION_HIDE_TRAY,
|
||||||
OPTION_ONE_WAY_CLIPBOARD_REDIRECTION,
|
OPTION_ONE_WAY_CLIPBOARD_REDIRECTION,
|
||||||
OPTION_ENABLE_CLIPBOARD_INIT_SYNC,
|
|
||||||
OPTION_ALLOW_LOGON_SCREEN_PASSWORD,
|
OPTION_ALLOW_LOGON_SCREEN_PASSWORD,
|
||||||
OPTION_ONE_WAY_FILE_TRANSFER,
|
OPTION_ONE_WAY_FILE_TRANSFER,
|
||||||
];
|
];
|
||||||
|
@ -1196,15 +1196,12 @@ impl<T: InvokeUiSession> Remote<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
if let Some(msg_out) = crate::clipboard::get_current_clipboard_msg(
|
if self.handler.lc.read().unwrap().sync_init_clipboard.v {
|
||||||
&peer_version,
|
if let Some(msg_out) = crate::clipboard::get_current_clipboard_msg(
|
||||||
&peer_platform,
|
&peer_version,
|
||||||
crate::clipboard::ClipboardSide::Client,
|
&peer_platform,
|
||||||
) {
|
crate::clipboard::ClipboardSide::Client,
|
||||||
if crate::get_builtin_option(
|
) {
|
||||||
config::keys::OPTION_ENABLE_CLIPBOARD_INIT_SYNC,
|
|
||||||
) != "N"
|
|
||||||
{
|
|
||||||
let sender = self.sender.clone();
|
let sender = self.sender.clone();
|
||||||
let permission_config = self.handler.get_permission_config();
|
let permission_config = self.handler.get_permission_config();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user