|
@@ -749,6 +749,7 @@ impl WindowBuilder for WindowBuilderWrapper {
|
|
|
.decorations(config.decorations)
|
|
|
.maximized(config.maximized)
|
|
|
.always_on_top(config.always_on_top)
|
|
|
+ .visible_on_all_workspaces(config.visible_on_all_workspaces)
|
|
|
.content_protected(config.content_protected)
|
|
|
.skip_taskbar(config.skip_taskbar)
|
|
|
.theme(config.theme)
|
|
@@ -875,6 +876,13 @@ impl WindowBuilder for WindowBuilderWrapper {
|
|
|
self
|
|
|
}
|
|
|
|
|
|
+ fn visible_on_all_workspaces(mut self, visible_on_all_workspaces: bool) -> Self {
|
|
|
+ self.inner = self
|
|
|
+ .inner
|
|
|
+ .with_visible_on_all_workspaces(visible_on_all_workspaces);
|
|
|
+ self
|
|
|
+ }
|
|
|
+
|
|
|
fn content_protected(mut self, protected: bool) -> Self {
|
|
|
self.inner = self.inner.with_content_protection(protected);
|
|
|
self
|
|
@@ -1121,6 +1129,7 @@ pub enum WindowMessage {
|
|
|
SetDecorations(bool),
|
|
|
SetShadow(bool),
|
|
|
SetAlwaysOnTop(bool),
|
|
|
+ SetVisibleOnAllWorkspaces(bool),
|
|
|
SetContentProtected(bool),
|
|
|
SetSize(Size),
|
|
|
SetMinSize(Option<Size>),
|
|
@@ -1550,6 +1559,16 @@ impl<T: UserEvent> Dispatch<T> for WryDispatcher<T> {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
+ fn set_visible_on_all_workspaces(&self, visible_on_all_workspaces: bool) -> Result<()> {
|
|
|
+ send_user_message(
|
|
|
+ &self.context,
|
|
|
+ Message::Window(
|
|
|
+ self.window_id,
|
|
|
+ WindowMessage::SetVisibleOnAllWorkspaces(visible_on_all_workspaces),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
fn set_content_protected(&self, protected: bool) -> Result<()> {
|
|
|
send_user_message(
|
|
|
&self.context,
|
|
@@ -2499,6 +2518,9 @@ fn handle_user_message<T: UserEvent>(
|
|
|
window.set_has_shadow(_enable);
|
|
|
}
|
|
|
WindowMessage::SetAlwaysOnTop(always_on_top) => window.set_always_on_top(always_on_top),
|
|
|
+ WindowMessage::SetVisibleOnAllWorkspaces(visible_on_all_workspaces) => {
|
|
|
+ window.set_visible_on_all_workspaces(visible_on_all_workspaces)
|
|
|
+ }
|
|
|
WindowMessage::SetContentProtected(protected) => {
|
|
|
window.set_content_protection(protected)
|
|
|
}
|