From f5eb2bb124fd86a2df1d34b7b05e2174233adff4 Mon Sep 17 00:00:00 2001 From: Suriyakumarvijayanayagam Date: Wed, 30 Sep 2026 13:22:04 +0530 Subject: [PATCH] The green button was disabled by an options block that was not there Reported from the Mac build: the window cannot be maximised. It is not a Wails limitation or a WebView quirk, it is an omission with a very specific consequence. Wails computes zoomable INSIDE `if frontendOptions.Mac != nil`: var fullSizeContent, hideTitleBar, zoomable, ... C.int // 0 if frontendOptions.Mac != nil { zoomable = bool2Cint(!frontendOptions.Mac.DisableZoom) } and the native side then acts on the zero: if (!zoomable && resizable) { NSButton *button = [self.mainWindow standardWindowButton:NSWindowZoomButton]; [button setEnabled: NO]; } So leaving Mac unset does not mean "take the defaults" - it means the green button is created and then explicitly disabled. There was a Windows options block and no Mac one, which is how this survived: the platform that was configured behaved, and the platform that was not looked broken. Fixed by the block existing. The fields are written out rather than left as an empty struct so it reads as a decision rather than something half typed. Verified at runtime rather than by reasoning about the source alone: all three title-bar buttons report enabled=true through the accessibility API, and the window resizes to 1440x900, the full display. One correction to my own first check, recorded because it nearly sent me the wrong way: querying AXFullScreenButton as an ATTRIBUTE of the window returns "missing value" whether or not the button exists. It has to be found by subrole among the window's buttons. The button was fine; the question was wrong. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KGcjxF1cNLcuwc3DAPcnfj --- desktop/main.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/desktop/main.go b/desktop/main.go index 0f35345..e9bf9da 100644 --- a/desktop/main.go +++ b/desktop/main.go @@ -17,6 +17,7 @@ import ( "github.com/wailsapp/wails/v2" "github.com/wailsapp/wails/v2/pkg/options" "github.com/wailsapp/wails/v2/pkg/options/assetserver" + "github.com/wailsapp/wails/v2/pkg/options/mac" "github.com/wailsapp/wails/v2/pkg/options/windows" "github.com/wailsapp/wails/v2/pkg/runtime" ) @@ -98,6 +99,17 @@ func main() { app.StopEngine() }, Bind: []any{app}, + // This block has to EXIST, not merely be empty. Wails computes + // `zoomable = !Mac.DisableZoom` inside `if frontendOptions.Mac != + // nil`, and the variable defaults to 0 - so leaving Mac unset does not + // mean "defaults", it means the green maximise button is created dead. + // There was a Windows block and no Mac one, so the window could not be + // zoomed on macOS and nothing anywhere said why. + Mac: &mac.Options{ + WebviewIsTransparent: false, + WindowIsTranslucent: false, + DisableZoom: false, + }, Windows: &windows.Options{ WebviewIsTransparent: false, WindowIsTranslucent: false,