diff --git a/internal/glfw/const.go b/internal/glfw/const.go index 2cb1e4344..a7c4610b1 100644 --- a/internal/glfw/const.go +++ b/internal/glfw/const.go @@ -79,6 +79,7 @@ const ( ) const ( + AutoIconify = Hint(0x00020006) ClientAPI = Hint(0x00022001) ContextVersionMajor = Hint(0x00022002) ContextVersionMinor = Hint(0x00022003) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index ca9b8b1f1..b4d6f622f 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -849,6 +849,13 @@ func (u *UserInterface) init() error { glfw.WindowHint(glfw.ClientAPI, glfw.NoAPI) } + // Enable auto-iconifying on Windows and macOS until some fullscreen issues are solved (#1506). + if runtime.GOOS == "windows" || runtime.GOOS == "darwin" { + glfw.WindowHint(glfw.AutoIconify, glfw.True) + } else { + glfw.WindowHint(glfw.AutoIconify, glfw.False) + } + decorated := glfw.False if u.isInitWindowDecorated() { decorated = glfw.True