Skip to content

Expose allowed titlebar button actions from the platform implementation and respect them from drawn decorations#21035

Merged
MrJul merged 6 commits into
masterfrom
feature/allowed-csd-components
Mar 31, 2026
Merged

Expose allowed titlebar button actions from the platform implementation and respect them from drawn decorations#21035
MrJul merged 6 commits into
masterfrom
feature/allowed-csd-components

Conversation

@kekekeks

Copy link
Copy Markdown
Member

Linux has various environments where minimize, maximize and fullscreen don't make any sense (e. g. i3). This PR detects it for X11 and hides corresponding titlebar buttons.

On wayland this will be mapped to xdg_toplevel::wm_capabilities

@avaloniaui-bot

Copy link
Copy Markdown

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

@avaloniaui-bot

Copy link
Copy Markdown

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

Comment thread src/Avalonia.Controls/Platform/IWindowImpl.cs
Comment thread src/Avalonia.Controls/Platform/PlatformAllowedWindowActions.cs Outdated
MrJul
MrJul previously approved these changes Mar 30, 2026
/// <summary>
/// The underlying platform supports minimizing windows.
/// </summary>
Minimize = 1 << 2

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.

Missing comma

@avaloniaui-bot

Copy link
Copy Markdown

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

@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.

LGTM!

@MrJul MrJul added this pull request to the merge queue Mar 31, 2026
Merged via the queue into master with commit 412dca3 Mar 31, 2026
11 checks passed
@MrJul MrJul deleted the feature/allowed-csd-components branch March 31, 2026 12:24
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