From 0ac927f0047a245a953f3e0fe834012fdb659985 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 12 Sep 2021 23:38:38 +0900 Subject: [PATCH] internal/uidriver/glfw: Bug fix: Forbide Maximize/MinimizeWindow on the native fullscreen on macOS Closes #1810 --- internal/uidriver/glfw/ui.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index dc326ae43..3d357a02e 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -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() {