|
@@ -859,6 +859,9 @@ pub struct WindowConfig {
|
|
|
/// Whether the window should always be on top of other windows.
|
|
|
#[serde(default, alias = "always-on-top")]
|
|
|
pub always_on_top: bool,
|
|
|
+ /// Prevents the window contents from being captured by other apps.
|
|
|
+ #[serde(default, alias = "content-protected")]
|
|
|
+ pub content_protected: bool,
|
|
|
/// If `true`, hides the window icon from the taskbar on Windows and Linux.
|
|
|
#[serde(default, alias = "skip-taskbar")]
|
|
|
pub skip_taskbar: bool,
|
|
@@ -908,6 +911,7 @@ impl Default for WindowConfig {
|
|
|
visible: default_visible(),
|
|
|
decorations: default_decorations(),
|
|
|
always_on_top: false,
|
|
|
+ content_protected: false,
|
|
|
skip_taskbar: false,
|
|
|
theme: None,
|
|
|
title_bar_style: Default::default(),
|
|
@@ -1329,6 +1333,9 @@ pub struct WindowAllowlistConfig {
|
|
|
/// Allows setting the always_on_top flag of the window.
|
|
|
#[serde(default, alias = "set-always-on-top")]
|
|
|
pub set_always_on_top: bool,
|
|
|
+ /// Allows preventing the window contents from being captured by other apps.
|
|
|
+ #[serde(default, alias = "set-content-protected")]
|
|
|
+ pub set_content_protected: bool,
|
|
|
/// Allows setting the window size.
|
|
|
#[serde(default, alias = "set-size")]
|
|
|
pub set_size: bool,
|
|
@@ -1394,6 +1401,7 @@ impl Allowlist for WindowAllowlistConfig {
|
|
|
close: true,
|
|
|
set_decorations: true,
|
|
|
set_always_on_top: true,
|
|
|
+ set_content_protected: false,
|
|
|
set_size: true,
|
|
|
set_min_size: true,
|
|
|
set_max_size: true,
|
|
@@ -1444,6 +1452,12 @@ impl Allowlist for WindowAllowlistConfig {
|
|
|
set_always_on_top,
|
|
|
"window-set-always-on-top"
|
|
|
);
|
|
|
+ check_feature!(
|
|
|
+ self,
|
|
|
+ features,
|
|
|
+ set_content_protected,
|
|
|
+ "window-set-content-protected"
|
|
|
+ );
|
|
|
check_feature!(self, features, set_size, "window-set-size");
|
|
|
check_feature!(self, features, set_min_size, "window-set-min-size");
|
|
|
check_feature!(self, features, set_max_size, "window-set-max-size");
|
|
@@ -3040,6 +3054,7 @@ mod build {
|
|
|
let visible = self.visible;
|
|
|
let decorations = self.decorations;
|
|
|
let always_on_top = self.always_on_top;
|
|
|
+ let content_protected = self.content_protected;
|
|
|
let skip_taskbar = self.skip_taskbar;
|
|
|
let theme = opt_lit(self.theme.as_ref());
|
|
|
let title_bar_style = &self.title_bar_style;
|
|
@@ -3072,6 +3087,7 @@ mod build {
|
|
|
visible,
|
|
|
decorations,
|
|
|
always_on_top,
|
|
|
+ content_protected,
|
|
|
skip_taskbar,
|
|
|
theme,
|
|
|
title_bar_style,
|