slab menubar: ⌃⌃ fits the whole window — drive the compositor's zoom directly master
CGSSetZoomParameters takes exactly the two things the public surface won't give up: an origin AND a factor. So the framing is entirely ours — fit the window, leave 10% of context, centre it — while the rendering stays the window server's, which is why it's smooth. UAZoomChangeFocus (pans but can't scale) and the ⌥⌘8 + closeViewDesiredZoomFactor route (the pref isn't read live) are both dead ends; this needs neither, and touches none of the user's Accessibility settings. The reason this looked like a dead API for so long: `factor` is a DOUBLE, not a float. Read through a Float* it comes back as exactly 0.0 every time — the low 32 bits of 1.0/2.0/4.0 as doubles are all zero — which reads like "no value" rather than "wrong type". `origin` is the viewport CENTRE, in CoreGraphics globals (top-left, y down), in points. Setting factor > 1 engages the zoom on its own; 1.0 exits. Verified end to end by reading the factor back out of the compositor: an 811x474 window on a 1408x881 screen gives fit 1.736 → factor 1.578, origin (611,410) = the window's centre. Measured: 1.578 at (611,410). Worth recording that the zoom is invisible to screenshots — it's a compositor transform, so screencapture and ScreenCaptureKit both return the UNZOOMED framebuffer. CGSGetZoomParameters is the only way to see it, which is what made the earlier blind iterations so slow. Compositor zoom outlives the process, so we zoom out on terminate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>