diff --git a/cli/tauri.js/src/template/defaultConfig.ts b/cli/tauri.js/src/template/defaultConfig.ts index 70d332f56..c6372d00e 100644 --- a/cli/tauri.js/src/template/defaultConfig.ts +++ b/cli/tauri.js/src/template/defaultConfig.ts @@ -33,7 +33,11 @@ export default { all: true }, window: { - title: 'Tauri App' + title: 'Tauri App', + width: 800, + height: 600, + resizable: true, + fullscreen: false }, security: { csp: "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'" diff --git a/cli/tauri.js/test/jest/fixtures/app-test-setup.js b/cli/tauri.js/test/jest/fixtures/app-test-setup.js index 4f191fcd8..b165b6d54 100644 --- a/cli/tauri.js/test/jest/fixtures/app-test-setup.js +++ b/cli/tauri.js/test/jest/fixtures/app-test-setup.js @@ -6,7 +6,7 @@ const mockFixtureDir = path.resolve(__dirname, '../fixtures') module.exports.fixtureDir = mockFixtureDir module.exports.initJest = (mockFixture) => { - jest.setTimeout(240000) + jest.setTimeout(720000) jest.mock('helpers/non-webpack-require', () => { return path => { const value = require('fs').readFileSync(path).toString() diff --git a/tauri/examples/communication/src-tauri/Cargo.toml b/tauri/examples/communication/src-tauri/Cargo.toml index d54137849..810bbd11c 100644 --- a/tauri/examples/communication/src-tauri/Cargo.toml +++ b/tauri/examples/communication/src-tauri/Cargo.toml @@ -24,7 +24,7 @@ icon = [ [dependencies] serde_json = "1.0" serde = { version = "1.0", features = [ "derive" ] } -tauri = { version = "0.4", features = [ "all-api", "edge" ] } +tauri = { path = "../../..", features = [ "all-api", "edge" ] } [target."cfg(windows)".build-dependencies] winres = "0.1" diff --git a/tauri/src/app/runner.rs b/tauri/src/app/runner.rs index ec78d846f..7e7add4c7 100644 --- a/tauri/src/app/runner.rs +++ b/tauri/src/app/runner.rs @@ -191,12 +191,13 @@ fn build_webview( let width = config.tauri.window.width; let height = config.tauri.window.height; let resizable = config.tauri.window.resizable; + let fullscreen = config.tauri.window.fullscreen; let title = config.tauri.window.title.into_boxed_str(); let has_splashscreen = splashscreen_content.is_some(); let mut initialized_splashscreen = false; - let webview = builder() + let mut webview = builder() .title(Box::leak(title)) .size(width, height) .resizable(resizable) @@ -251,6 +252,8 @@ fn build_webview( }) .build()?; + webview.set_fullscreen(fullscreen); + if has_splashscreen { // inject the tauri.js entry point webview diff --git a/tauri/src/config.rs b/tauri/src/config.rs index ca0f0ea79..027d0acf0 100644 --- a/tauri/src/config.rs +++ b/tauri/src/config.rs @@ -13,6 +13,8 @@ pub struct WindowConfig { pub resizable: bool, #[serde(default = "default_title")] pub title: String, + #[serde(default)] + pub fullscreen: bool, } fn default_width() -> i32 { @@ -37,6 +39,7 @@ fn default_window() -> WindowConfig { height: default_height(), resizable: default_resizable(), title: default_title(), + fullscreen: false, } } @@ -128,6 +131,7 @@ mod test { height: 600, resizable: true, title: String::from("Tauri App"), + fullscreen: false, }, embedded_server: EmbeddedServerConfig { host: String::from("http://127.0.0.1"), @@ -180,6 +184,7 @@ mod test { height: 600, resizable: true, title: String::from("Tauri App"), + fullscreen: false, }, embedded_server: EmbeddedServerConfig { host: String::from("http://127.0.0.1"),