From 39e7f71ccbe53152d0cc7f17fa6e6bde9bdf5005 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 71d79b525..6498f4215 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -1472,6 +1472,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() { @@ -1497,6 +1501,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() {