5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 05:30:22 +08:00

[v2, linux] Fix StartHidden option not working on Linux (#2624)

* fix: StartHidden option not working on Linux

* chore: add an entry to the changelog
This commit is contained in:
LGiki 2023-04-29 23:20:39 +08:00 committed by GitHub
parent fa0afe92f0
commit 832d6bc4d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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