diff --git a/v2/internal/frontend/desktop/linux/window.go b/v2/internal/frontend/desktop/linux/window.go index f1700908c..9cc86afbb 100644 --- a/v2/internal/frontend/desktop/linux/window.go +++ b/v2/internal/frontend/desktop/linux/window.go @@ -287,6 +287,9 @@ func (w *Window) Run(url string) { _url := C.CString(url) C.LoadIndex(w.webview, _url) defer C.free(unsafe.Pointer(_url)) + if w.appoptions.StartHidden { + w.Hide() + } C.gtk_widget_show_all(w.asGTKWidget()) w.Center() switch w.appoptions.WindowStartState { @@ -297,7 +300,6 @@ func (w *Window) Run(url string) { case options.Maximised: w.Maximise() } - } func (w *Window) SetKeepAbove(top bool) { diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.mdx index 6e2ab3e4e..fa3f2403b 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.mdx @@ -30,6 +30,7 @@ - 修复 macOS 上的 `runtime.MenuUpdateApplicationMenu`。 由 @stffabi 在这个 [PR](https://github.com/wailsapp/wails/pull/2588) 中修复 - 修复了为 `libwebkit`/`pkg-config` 添加包名称并在 `zypper.go` 中使用 shell.RunCommandWithENV 而不是 shell.RunCommand。 由 @wgjtyu 在这个 [PR](https://github.com/wailsapp/wails/pull/2593) 中修复 - 确保在 Windows 上的主线程上启动 CommonFileDialogs。 由 @stffabi 在这个 [PR](https://github.com/wailsapp/wails/pull/2606) 中修复 +- 修复 `StartHidden` 选项在 Linux 上不生效。 由 @LGiki 在这个 [PR](https://github.com/wailsapp/wails/pull/2624) 中修复。 ## v2.4.1 - 2023-03-20 diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index 015f2e3f1..f7f17ceb6 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed add package name for `libwebkit`/`pkg-config` and use shell.RunCommandWithENV instead of shell.RunCommand in `zypper.go`. Fixed by @wgjtyu in [PR](https://github.com/wailsapp/wails/pull/2593) - Make sure to start the CommonFileDialogs on Windows on the Main-Thread. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2606) - Fixed generated typescript bindings. Fixed by @dominictwlee in [PR](https://github.com/wailsapp/wails/pull/2552) +- Fixed `StartHidden` option not working on Linux. Fixed by @LGiki in [PR](https://github.com/wailsapp/wails/pull/2624) ## v2.4.1 - 2023-03-20