Files
UTM/Platform/macOS
osy 230f400ddc display: fill the area beside the camera housing in full screen
A full screen VM on a Mac with a camera housing loses the strip beside
it, which the guest could otherwise use. Two things keep a native full
screen window out of that strip: AppKit insets the full screen frame and
the window server covers the strip with an opaque menu bar. There is no
public way around either, and a borderless window is not an option
because macOS would no longer treat the VM as a full screen app.

Add an opt-in preference (macOS 27+) and a window subclass that returns
the whole screen as the full screen frame and makes the menu bar of its
own full screen space transparent while it is not revealed. When the menu
bar is revealed it looks and behaves as it always did. It works within
the App Sandbox.

All of it relies on private AppKit and SkyLight symbols. None of them are
used or hooked until the option is enabled and a window enters full
screen, so the window is unaffected by changes to them otherwise. They
are looked up at runtime by name and checked against the signatures we
expect, so no private symbol is linked or compiled into the binary and
if any are missing or different the window behaves like any other.

The window server reveals the menu bar as soon as the pointer is over the
strip, which would make that area of the guest display unusable. It is
instead only revealed when the pointer reaches the top edge of the
screen: until then the space uses presentation options that hide the menu
bar, which also hides the Dock. AppKit applies the options of the space
again when it changes spaces, so they are kept up to date.

The window server only lets a window cover the strip if it does so from
the moment it enters the full screen space, which shapes the rest:

- Every frame query in the transition is answered with the whole screen,
  and later requests to resize the window are ignored, because asking
  for any frame again, even the current one, moves it out of the strip.
  Our window controllers do so to fit the guest display, and AppKit does
  when the space becomes active again.
- Once the strip has been left, such as when tiled in Split View, it is
  not asked for again until full screen is next entered.
- The QEMU window is no longer resized to fit a display the guest just
  changed while the transition to full screen is still running. The flag
  the controller kept for that is only set once the transition is over,
  so the window ended up taller than the screen and lost the strip.
- AppKit parks the auto hidden toolbar behind the menu bar, or over our
  content while the menu bar is hidden, so it is hidden along with it.

The window stands down when tiled, on a screen without a camera housing,
and when the menu bar is set to always be visible in full screen.
Terminal windows do not opt in.

Resolves #6183

Assisted-by: Claude:claude-fable-5-1
Assisted-by: Claude:claude-opus-5
2026-09-19 18:27:21 -05:00
..
2022-10-17 01:58:54 +02:00
2022-07-31 18:47:11 -07:00
2022-07-31 18:23:39 -07:00
2024-02-26 19:58:13 -08:00
2025-08-01 12:10:17 +08:00