macOS Sonoma changes the NSView.clipsToBounds to false by default where it was true in earlier version of macOS. This causes the window contents to be obscured by the window frame. This fixes the issue by conditionally setting the clipping on Sonoma to true.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1994 Signed-off-by: David Parsons <d...@daveparsons.net> diff --git a/ui/cocoa.m b/ui/cocoa.m index eb99064bee..c9e3b96004 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -365,6 +365,9 @@ - (id)initWithFrame:(NSRect)frameRect screen.width = frameRect.size.width; screen.height = frameRect.size.height; kbd = qkbd_state_init(dcl.con); + if (@available(macOS 14, *)) { + [self setClipsToBounds:YES]; + } } return self;