mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 18:29:53 +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() {
|
||||
if f.frontendOptions.OnStartup != nil {
|
||||
f.frontendOptions.OnStartup(f.ctx)
|
||||
}
|
||||
}()
|
||||
|
||||
if f.frontendOptions.Fullscreen {
|
||||
mainWindow.Fullscreen()
|
||||
}
|
||||
|
||||
mainWindow.Run()
|
||||
return nil
|
||||
}
|
||||
|
@ -75,10 +75,6 @@ func NewWindow(parent winc.Controller, options *options.App) *Window {
|
||||
|
||||
result.SetFont(winc.DefaultFont)
|
||||
|
||||
if options.Fullscreen {
|
||||
result.Fullscreen()
|
||||
}
|
||||
|
||||
if options.Menu != nil {
|
||||
result.SetApplicationMenu(options.Menu)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user