Skip to content

fix(macos): prevent title bar flash on fullscreen exit - #22101

Merged
MrJul merged 1 commit into
AvaloniaUI:mainfrom
Illustar0:fix/macos-fullscreen-titlebar-flash
Sep 1, 2026
Merged

fix(macos): prevent title bar flash on fullscreen exit#22101
MrJul merged 1 commit into
AvaloniaUI:mainfrom
Illustar0:fix/macos-fullscreen-titlebar-flash

Conversation

@Illustar0

@Illustar0 Illustar0 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

What does the pull request do?

Prevents the native macOS title bar from briefly appearing when an extended-client-area window exits fullscreen.

I noticed this behavior while investigating #21119.

What is the current behavior?

On macOS, a window using ExtendClientAreaToDecorationsHint="True" with WindowDecorations="Full" can briefly display the opaque native title bar when exiting fullscreen.

This is especially noticeable when the extended client area is used to render a custom title bar. The flash disappears once Avalonia restores the transparent title bar after the transition.

12.1.1.mp4
before

What is the updated/expected behavior with this PR?

999.mp4
after

How was the solution implemented (if it's not obvious)?

None.

Checklist

Breaking changes

None.

Obsoletions / Deprecations

None.

Fixed issues

None.

@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0069153-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul added bug os-macos backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Aug 31, 2026
- Restore title bar transparency before AppKit begins the exit animation for windows with an extended client area.
@Illustar0
Illustar0 force-pushed the fix/macos-fullscreen-titlebar-flash branch from bed7827 to 28286db Compare September 1, 2026 08:47

@MrJul MrJul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches the logic we already have elsewhere for extended mode.
Tested, it works as expected.
LGTM!

@MrJul
MrJul enabled auto-merge September 1, 2026 15:25
@MrJul
MrJul added this pull request to the merge queue Sep 1, 2026
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0069254-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 1, 2026
@MrJul
MrJul added this pull request to the merge queue Sep 1, 2026
Merged via the queue into AvaloniaUI:main with commit 59affb9 Sep 1, 2026
9 checks passed
@Illustar0
Illustar0 deleted the fix/macos-fullscreen-titlebar-flash branch September 2, 2026 04:02
MrJul pushed a commit to MrJul/Avalonia that referenced this pull request Sep 2, 2026
)

- Restore title bar transparency before AppKit begins the exit animation for windows with an extended client area.
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants