mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 17:52:29 +08:00
[windows] fix fullscreen at startup
This commit is contained in:
parent
29a2d5b3d8
commit
fe6dd4d18f
@ -112,13 +112,16 @@ func (f *Frontend) Run(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Move this into a callback from frontend
|
|
||||||
go func() {
|
go func() {
|
||||||
if f.frontendOptions.OnStartup != nil {
|
if f.frontendOptions.OnStartup != nil {
|
||||||
f.frontendOptions.OnStartup(f.ctx)
|
f.frontendOptions.OnStartup(f.ctx)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
if f.frontendOptions.Fullscreen {
|
||||||
|
mainWindow.Fullscreen()
|
||||||
|
}
|
||||||
|
|
||||||
mainWindow.Run()
|
mainWindow.Run()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -75,10 +75,6 @@ func NewWindow(parent winc.Controller, options *options.App) *Window {
|
|||||||
|
|
||||||
result.SetFont(winc.DefaultFont)
|
result.SetFont(winc.DefaultFont)
|
||||||
|
|
||||||
if options.Fullscreen {
|
|
||||||
result.Fullscreen()
|
|
||||||
}
|
|
||||||
|
|
||||||
if options.Menu != nil {
|
if options.Menu != nil {
|
||||||
result.SetApplicationMenu(options.Menu)
|
result.SetApplicationMenu(options.Menu)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user