5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 04:42:00 +08:00

fix: [v2] win runtime.WindowMinimise()

This commit is contained in:
redraskal 2022-01-10 23:00:31 -06:00
parent 0593c29784
commit b32c5b7ba2
No known key found for this signature in database
GPG Key ID: 768633FAC02DDFFA

View File

@ -211,7 +211,11 @@ func (f *Frontend) WindowUnmaximise() {
}
func (f *Frontend) WindowMinimise() {
runtime.LockOSThread()
f.mainWindow.Minimise()
if f.hasStarted {
f.mainWindow.Minimise()
} else {
f.frontendOptions.WindowStartState = options.Minimised
}
}
func (f *Frontend) WindowUnminimise() {
runtime.LockOSThread()