Conversation
Adds an "Open virtual machine windows as tabs of the main window" setting (off by default). When it is on, a VM window opened from the library or through scripting is attached as a tab of the library window instead of opening as a separate window, and automatic window tabbing is no longer disabled at launch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #3812.
Many people run one or two VMs and would rather keep the VM screen inside UTM's main window than manage a separate window for each VM. macOS already provides this through native window tabbing, but UTM turns tabbing off app-wide (
NSWindow.allowsAutomaticWindowTabbing = falseinContentView).This adds a setting, Settings → Application → "Open virtual machine windows as tabs of the main window", off by default, so nothing changes for anyone who does not enable it.
When it is on:
utmctl start, is attached as a tab of the library window (addTabbedWindow(_:ordered:)), since both paths go throughUTMData.run(vm:);Changes are limited to three files:
Platform/Shared/ContentView.swift(one line),Platform/macOS/SettingsView.swift(the toggle),Platform/macOS/UTMDataExtension.swift(the attach step).Tested on macOS 26 (Apple silicon) with an unsigned build of this branch and a QEMU VM (aarch64, display on):
utmctl start <vm>with UTM already open → same, no separate window;utmctltwice), no crashes.With the setting off, the attach step returns before doing anything and
allowsAutomaticWindowTabbingis set tofalseexactly as before (read from the code; not separately exercised).The new string is not localized yet.