Skip to content

Commit

Permalink
Merge branch 'next' into refactor/move-updater
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 9, 2023
2 parents afe8bee + 60cf9ed commit 95607e4
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 141 deletions.
6 changes: 6 additions & 0 deletions .changes/move-process.md
@@ -0,0 +1,6 @@
---
"api": patch
"tauri": patch
---

Moved the `process` feature to its own plugin in the plugins-workspace repository.
5 changes: 5 additions & 0 deletions .changes/shadows-default-on.md
@@ -0,0 +1,5 @@
---
'tauri': 'patch'
---

Enable shadows by default.
2 changes: 1 addition & 1 deletion core/tauri-config-schema/schema.json
Expand Up @@ -702,7 +702,7 @@
},
"shadow": {
"description": "Whether or not the window has shadow.\n\n## Platform-specific\n\n- **Windows:** - `false` has no effect on decorated window, shadow are always ON. - `true` will make ndecorated window have a 1px white border, and on Windows 11, it will have a rounded corners. - **Linux:** Unsupported.",
"default": false,
"default": true,
"type": "boolean"
}
},
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-utils/src/config.rs
Expand Up @@ -800,7 +800,7 @@ pub struct WindowConfig {
/// - `true` will make ndecorated window have a 1px white border,
/// and on Windows 11, it will have a rounded corners.
/// - **Linux:** Unsupported.
#[serde(default)]
#[serde(default = "default_true")]
pub shadow: bool,
}

Expand Down Expand Up @@ -837,7 +837,7 @@ impl Default for WindowConfig {
accept_first_mouse: false,
tabbing_identifier: None,
additional_browser_args: None,
shadow: false,
shadow: true,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/scripts/bundle.global.js

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions core/tauri/src/endpoints.rs
Expand Up @@ -13,8 +13,6 @@ use serde_json::Value as JsonValue;
use std::sync::Arc;

mod event;
#[cfg(process_any)]
mod process;
mod window;

/// The context passed to the invoke handler.
Expand Down Expand Up @@ -51,8 +49,6 @@ impl<T: Serialize> From<T> for InvokeResponse {
#[derive(Deserialize)]
#[serde(tag = "module", content = "message")]
enum Module {
#[cfg(process_any)]
Process(process::Cmd),
Window(Box<window::Cmd>),
Event(event::Cmd),
}
Expand All @@ -71,13 +67,6 @@ impl Module {
package_info,
};
match self {
#[cfg(process_any)]
Self::Process(cmd) => resolver.respond_async(async move {
cmd
.run(context)
.and_then(|r| r.json)
.map_err(InvokeError::from_anyhow)
}),
Self::Window(cmd) => resolver.respond_async(async move {
cmd
.run(context)
Expand Down
58 changes: 0 additions & 58 deletions core/tauri/src/endpoints/process.rs

This file was deleted.

5 changes: 1 addition & 4 deletions examples/api/src-tauri/src/lib.rs
Expand Up @@ -54,10 +54,7 @@ pub fn run() {

#[cfg(target_os = "windows")]
{
window_builder = window_builder
.transparent(true)
.shadow(true)
.decorations(false);
window_builder = window_builder.transparent(true).decorations(false);
}

let window = window_builder.build().unwrap();
Expand Down
1 change: 0 additions & 1 deletion examples/splashscreen/tauri.conf.json
Expand Up @@ -42,7 +42,6 @@
"width": 400,
"height": 200,
"decorations": false,
"shadow": true,
"resizable": false,
"url": "splashscreen.html"
}
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/docs/js-api.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions tooling/api/src/index.ts
Expand Up @@ -15,11 +15,10 @@

import * as event from './event'
import * as path from './path'
import * as process from './process'
import * as tauri from './tauri'
import * as window from './window'

/** @ignore */
const invoke = tauri.invoke

export { invoke, event, path, process, tauri, window }
export { invoke, event, path, tauri, window }
58 changes: 0 additions & 58 deletions tooling/api/src/process.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tooling/cli/schema.json
Expand Up @@ -702,7 +702,7 @@
},
"shadow": {
"description": "Whether or not the window has shadow.\n\n## Platform-specific\n\n- **Windows:** - `false` has no effect on decorated window, shadow are always ON. - `true` will make ndecorated window have a 1px white border, and on Windows 11, it will have a rounded corners. - **Linux:** Unsupported.",
"default": false,
"default": true,
"type": "boolean"
}
},
Expand Down

0 comments on commit 95607e4

Please sign in to comment.