diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index fa73b3d2e..2a1f5fa6c 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -814,6 +814,7 @@ func (u *UserInterface) init() error { if err := u.createWindow(); err != nil { return err } + u.setSizeCallbackEnabled = true setSize := func() { ww, wh := u.getInitWindowSize() @@ -848,10 +849,6 @@ func (u *UserInterface) init() error { g.SetWindow(u.nativeWindow()) } - // Enable the SetSize callback after all the initialization finishes. Or, unexpected the callback - // is fired unexpectedly at the initial phase with a very small size on Linux. - u.setSizeCallbackEnabled = true - return nil }