mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 04:03:52 +03:00
* fix(macos): set default title-bar style to `Visible` * chore: add TODO
This commit is contained in:
parent
7acac58d23
commit
9546548ec0
6
.changes/runtime-macos-default-visible-titlebat.md
Normal file
6
.changes/runtime-macos-default-visible-titlebat.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri": "patch:bug"
|
||||
"tauri-runtime-wry": "patch"
|
||||
---
|
||||
|
||||
On macOS, set default titlebar style to `Visible` to prevent webview move out of the view.
|
@ -715,7 +715,20 @@ unsafe impl Send for WindowBuilderWrapper {}
|
||||
impl WindowBuilderBase for WindowBuilderWrapper {}
|
||||
impl WindowBuilder for WindowBuilderWrapper {
|
||||
fn new() -> Self {
|
||||
Self::default().focused(true)
|
||||
#[allow(unused_mut)]
|
||||
let mut builder = Self::default().focused(true);
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
// TODO: find a proper way to prevent webview being pushed out of the window.
|
||||
// Workround for issue: https://github.com/tauri-apps/tauri/issues/10225
|
||||
// The window requies `NSFullSizeContentViewWindowMask` flag to prevent devtools
|
||||
// pushing the content view out of the window.
|
||||
// By setting the default style to `TitleBarStyle::Visible` should fix the issue for most of the users.
|
||||
builder = builder.title_bar_style(TitleBarStyle::Visible);
|
||||
}
|
||||
|
||||
builder
|
||||
}
|
||||
|
||||
fn with_config(config: &WindowConfig) -> Self {
|
||||
|
Loading…
Reference in New Issue
Block a user