From e47f9ac38fe5a9438d447f2be1b5b7cca7350141 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 25 Sep 2022 20:10:31 +0900 Subject: [PATCH] internal/ui: bug fix: wrong bit operations Closes #2349 --- internal/ui/ui_glfw_darwin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ui/ui_glfw_darwin.go b/internal/ui/ui_glfw_darwin.go index 35b7e402a..2aecf9a55 100644 --- a/internal/ui/ui_glfw_darwin.go +++ b/internal/ui/ui_glfw_darwin.go @@ -282,11 +282,11 @@ func (u *userInterfaceImpl) setNativeFullscreen(fullscreen bool) { // toggleFullscreen doesn't work when the window is not resizable. origFullScreen := window.Send(sel_collectionBehavior)&cocoa.NSWindowCollectionBehaviorFullScreenPrimary != 0 if !origFullScreen { - window.Send(sel_setCollectionBehavior, window.Send(sel_collectionBehavior)|cocoa.NSWindowCollectionBehaviorFullScreenPrimary) + window.Send(sel_setCollectionBehavior, cocoa.NSUInteger(window.Send(sel_collectionBehavior))|cocoa.NSWindowCollectionBehaviorFullScreenPrimary) } window.Send(objc.RegisterName("toggleFullScreen:"), 0) if !origFullScreen { - window.Send(sel_setCollectionBehavior, window.Send(sel_collectionBehavior)&cocoa.NSWindowCollectionBehaviorFullScreenPrimary) + window.Send(sel_setCollectionBehavior, cocoa.NSUInteger(window.Send(sel_collectionBehavior))&^cocoa.NSUInteger(cocoa.NSWindowCollectionBehaviorFullScreenPrimary)) } }