|
@@ -971,6 +971,9 @@ pub struct WindowConfig {
|
|
|
/// If `true`, hides the window icon from the taskbar on Windows and Linux.
|
|
|
#[serde(default, alias = "skip-taskbar")]
|
|
|
pub skip_taskbar: bool,
|
|
|
+ /// The name of the window class created on Windows to create the window.
|
|
|
+ #[serde(default = "default_window_classname")]
|
|
|
+ pub window_classname: String,
|
|
|
/// The initial window theme. Defaults to the system theme. Only implemented on Windows and macOS 10.14+.
|
|
|
pub theme: Option<crate::Theme>,
|
|
|
/// The style of the macOS title bar.
|
|
@@ -1055,6 +1058,7 @@ impl Default for WindowConfig {
|
|
|
visible_on_all_workspaces: false,
|
|
|
content_protected: false,
|
|
|
skip_taskbar: false,
|
|
|
+ window_classname: default_window_classname(),
|
|
|
theme: None,
|
|
|
title_bar_style: Default::default(),
|
|
|
hidden_title: false,
|
|
@@ -1084,6 +1088,10 @@ fn default_title() -> String {
|
|
|
"Tauri App".to_string()
|
|
|
}
|
|
|
|
|
|
+fn default_window_classname() -> String {
|
|
|
+ "Window Class".to_string()
|
|
|
+}
|
|
|
+
|
|
|
/// A Content-Security-Policy directive source list.
|
|
|
/// See <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#sources>.
|
|
|
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
|
|
@@ -2240,6 +2248,7 @@ mod build {
|
|
|
let visible_on_all_workspaces = self.visible_on_all_workspaces;
|
|
|
let content_protected = self.content_protected;
|
|
|
let skip_taskbar = self.skip_taskbar;
|
|
|
+ let window_classname = str_lit(&self.window_classname);
|
|
|
let theme = opt_lit(self.theme.as_ref());
|
|
|
let title_bar_style = &self.title_bar_style;
|
|
|
let hidden_title = self.hidden_title;
|
|
@@ -2281,6 +2290,7 @@ mod build {
|
|
|
visible_on_all_workspaces,
|
|
|
content_protected,
|
|
|
skip_taskbar,
|
|
|
+ window_classname,
|
|
|
theme,
|
|
|
title_bar_style,
|
|
|
hidden_title,
|