diff --git a/v2/internal/frontend/desktop/windows/window.go b/v2/internal/frontend/desktop/windows/window.go index 4a66238b..aaf34854 100644 --- a/v2/internal/frontend/desktop/windows/window.go +++ b/v2/internal/frontend/desktop/windows/window.go @@ -40,8 +40,14 @@ func NewWindow(parent winc.Controller, options *options.App) *Window { result.SetHandle(winc.CreateWindow("wailsWindow", parent, uint(exStyle), uint(dwStyle))) result.SetParent(parent) - if ico, err := winc.NewIconFromResource(winc.GetAppInstance(), uint16(winc.AppIconID)); err == nil { - result.SetIcon(0, ico) + loadIcon := true + if options.Windows != nil && options.Windows.DisableWindowIcon == true { + loadIcon = false + } + if loadIcon { + if ico, err := winc.NewIconFromResource(winc.GetAppInstance(), uint16(winc.AppIconID)); err == nil { + result.SetIcon(0, ico) + } } result.SetSize(options.Width, options.Height) @@ -51,12 +57,6 @@ func NewWindow(parent winc.Controller, options *options.App) *Window { result.SetMinSize(options.MinWidth, options.MinHeight) result.SetMaxSize(options.MaxWidth, options.MaxHeight) - // Dlg forces display of focus rectangles, as soon as the user starts to type. - w32.SendMessage(result.Handle(), w32.WM_CHANGEUISTATE, w32.UIS_INITIALIZE, 0) - winc.RegMsgHandler(result) - - result.SetFont(winc.DefaultFont) - if options.Windows != nil { if options.Windows.WindowBackgroundIsTranslucent { result.SetTranslucentBackground() @@ -67,6 +67,12 @@ func NewWindow(parent winc.Controller, options *options.App) *Window { } } + // Dlg forces display of focus rectangles, as soon as the user starts to type. + w32.SendMessage(result.Handle(), w32.WM_CHANGEUISTATE, w32.UIS_INITIALIZE, 0) + winc.RegMsgHandler(result) + + result.SetFont(winc.DefaultFont) + if options.Fullscreen { result.Fullscreen() }