style: restore native window title bar and decorations on Linux - #108
style: restore native window title bar and decorations on Linux#1080xStuart wants to merge 1 commit into
Conversation
187d77e to
08ac38b
Compare
|
@codex review |
There was a problem hiding this comment.
💡 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".
| ExtendClientAreaToDecorationsHint = false; | ||
| WindowDecorations = WindowDecorations.Full; |
There was a problem hiding this comment.
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 👍 / 👎.
| if (OperatingSystem.IsLinux()) | ||
| { | ||
| ExtendClientAreaToDecorationsHint = false; | ||
| WindowDecorations = WindowDecorations.Full; |
There was a problem hiding this comment.
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 👍 / 👎.
On Linux (Wayland/X11), setting
ExtendClientAreaToDecorationsHint="True"hides standard system window decorations (close/maximize/minimize buttons).This PR configures window decorations dynamically at runtime:
ExtendClientAreaToDecorationsHint = false) and standard window decorations are enabled (WindowDecorations = WindowDecorations.Full). This restores native systemwindow title bars and buttons.
MainWindowViewModelFlowTests.csare updated to assert window decoration settings conditionally by platform.