From 28286db5bfd90cf29e2b730d6f686f91136a1850 Mon Sep 17 00:00:00 2001 From: Illustar0 Date: Sun, 30 Aug 2026 16:25:46 +0800 Subject: [PATCH] fix(macos): prevent title bar flash on fullscreen exit - Restore title bar transparency before AppKit begins the exit animation for windows with an extended client area. --- native/Avalonia.Native/src/OSX/AvnWindow.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/native/Avalonia.Native/src/OSX/AvnWindow.mm b/native/Avalonia.Native/src/OSX/AvnWindow.mm index de0c796d4ab..5912ac90aa6 100644 --- a/native/Avalonia.Native/src/OSX/AvnWindow.mm +++ b/native/Avalonia.Native/src/OSX/AvnWindow.mm @@ -348,6 +348,10 @@ - (void)windowDidResize:(NSNotification *_Nonnull)notification - (void)windowWillExitFullScreen:(NSNotification *_Nonnull)notification { + // Prepare the destination appearance before AppKit starts the exit animation. + if (_isExtended) + [self setTitlebarAppearsTransparent:true]; + auto parent = _parent.tryGetWithCast(); if(parent != nullptr)