Skip to content

style: restore native window title bar and decorations on Linux - #108

Open
0xStuart wants to merge 1 commit into
royalapplications:mainfrom
0xStuart:style/linux-native-decorations
Open

style: restore native window title bar and decorations on Linux#108
0xStuart wants to merge 1 commit into
royalapplications:mainfrom
0xStuart:style/linux-native-decorations

Conversation

@0xStuart

Copy link
Copy Markdown

On Linux (Wayland/X11), setting ExtendClientAreaToDecorationsHint="True" hides standard system window decorations (close/maximize/minimize buttons).

This PR configures window decorations dynamically at runtime:

  • If running on Linux, client area extension is disabled (ExtendClientAreaToDecorationsHint = false) and standard window decorations are enabled (WindowDecorations = WindowDecorations.Full). This restores native system
    window title bars and buttons.
  • On macOS and Windows, the custom border and caption/traffic-light positioning layouts are preserved.
  • Flow test assertions in MainWindowViewModelFlowTests.cs are updated to assert window decoration settings conditionally by platform.

@0xStuart
0xStuart force-pushed the style/linux-native-decorations branch from 187d77e to 08ac38b Compare July 20, 2026 13:23
@StefanKoell

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08ac38b309

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +79 to +80
ExtendClientAreaToDecorationsHint = false;
WindowDecorations = WindowDecorations.Full;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Supply a title when enabling Linux decorations

On Linux this branch enables server-side decorations, but MainWindow.axaml binds Window.Title to ShellWindowTitle, which returns string.Empty everywhere except macOS (MainWindowViewModel.cs:552); the existing flow test also explicitly expects that empty title on Linux. Consequently the restored native title bar is blank in Linux window managers. Return a product/window title for Linux (and update that assertion) when native decorations are used.

Useful? React with 👍 / 👎.

Comment on lines +77 to +80
if (OperatingSystem.IsLinux())
{
ExtendClientAreaToDecorationsHint = false;
WindowDecorations = WindowDecorations.Full;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Move the Linux decoration policy out of code-behind

This adds platform-specific presentation behavior directly to MainWindow code-behind. The repository's strict MVVM rule requires views to remain passive and limits code-behind to InitializeComponent(); put this policy in a behavior/coordinator or another presentation service so the view does not own runtime UI logic.

AGENTS.md reference: AGENTS.md:L18-L20

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants