-
Notifications
You must be signed in to change notification settings - Fork 1
style: restore native window title bar and decorations on Linux #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,9 +74,18 @@ private void InitializeComponent() | |
|
|
||
| private void ConfigurePlatformWindowDecorations() | ||
| { | ||
| WindowDecorations = OperatingSystem.IsMacOS() | ||
| ? WindowDecorations.Full | ||
| : WindowDecorations.BorderOnly; | ||
| if (OperatingSystem.IsLinux()) | ||
| { | ||
| ExtendClientAreaToDecorationsHint = false; | ||
| WindowDecorations = WindowDecorations.Full; | ||
|
Comment on lines
+77
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This adds platform-specific presentation behavior directly to AGENTS.md reference: AGENTS.md:L18-L20 Useful? React with 👍 / 👎. |
||
| } | ||
| else | ||
| { | ||
| ExtendClientAreaToDecorationsHint = true; | ||
| WindowDecorations = OperatingSystem.IsMacOS() | ||
| ? WindowDecorations.Full | ||
| : WindowDecorations.BorderOnly; | ||
| } | ||
| } | ||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Linux this branch enables server-side decorations, but
MainWindow.axamlbindsWindow.TitletoShellWindowTitle, which returnsstring.Emptyeverywhere 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 👍 / 👎.