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 4509f2aee4
commit 39e7f71ccb

View File

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