From 2fe0d568ce96920096e9d463d41c7965e75bb631 Mon Sep 17 00:00:00 2001 From: Guofang Date: Fri, 23 Oct 2026 23:36:31 +0800 Subject: [PATCH] Zoom the macOS display window to fit so the installer screen is usable on Retina cocoa does not scale the guest by default, so the 1024x768 ramfb screen of the Windows installer looks tiny on a Retina display. zoom-to-fit stretches it to the window, as UTM does. Co-Authored-By: Claude Sonnet 5.5 --- run-windows11.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/run-windows11.py b/run-windows11.py index 5471bfc..504373f 100755 --- a/run-windows11.py +++ b/run-windows11.py @@ -138,7 +138,8 @@ Environment variables: WIN11_VM_UEFI_VARS OVMF variable-store template path (auto-detected if unset) WIN11_VM_QEMU_CONFIG QEMU config template passed to -readconfig (default: qemu/windows11.ini) - WIN11_VM_DISPLAY QEMU display backend (default: cocoa on macOS, gtk elsewhere) + WIN11_VM_DISPLAY QEMU display backend (default: cocoa,zoom-to-fit=on on macOS, + gtk elsewhere) """) @@ -371,8 +372,11 @@ if installing: "-b", str(base_image), str(disk_image), disk_size]) print(f"Created Windows 11 system disk: {disk_image}") +# cocoa does not scale the guest by default, so the low-resolution installer +# screen looks tiny on a Retina display; zoom-to-fit stretches it to the window, +# as UTM does. display_backend = env("WIN11_VM_DISPLAY") or ( - "cocoa" if platform.system() == "Darwin" else "gtk") + "cocoa,zoom-to-fit=on" if platform.system() == "Darwin" else "gtk") # Most of the VM definition lives in the QEMU config template; fill in the # file paths and hand the rendered file to QEMU with -readconfig.