internal/uidriver/glfw: Bug fix: Forbide Maximize/MinimizeWindow on the native fullscreen on macOS

Closes #1810
This commit is contained in:
Hajime Hoshi 2021-09-12 23:38:38 +09:00
parent 74641b1941
commit 0ac927f004

View File

@ -1383,6 +1383,10 @@ func (u *UserInterface) Window() driver.Window {
// maximizeWindow must be called from the main thread.
func (u *UserInterface) maximizeWindow() {
if u.isNativeFullscreen() {
return
}
if u.setSizeCallbackEnabled {
u.setSizeCallbackEnabled = false
defer func() {
@ -1408,6 +1412,10 @@ func (u *UserInterface) maximizeWindow() {
// iconifyWindow must be called from the main thread.
func (u *UserInterface) iconifyWindow() {
if u.isNativeFullscreen() {
return
}
if u.setSizeCallbackEnabled {
u.setSizeCallbackEnabled = false
defer func() {