Repository navigation
titlebar: Follow Linux window button layouts - #4018
Merged
madcodelife merged 1 commit intoNov 17, 2026
Merged
Conversation
Member
|
✅ LGTM with one note: Linux TitleBar now follows the desktop's window button layout and live updates; no public API change.
|
madcodelife
approved these changes
Nov 17, 2026
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Linux
TitleBarcurrently hard-codes its controls on the trailing side in minimize/maximize/close order, even though the GPUI platform provides aWindowButtonLayoutand notifies windows when the host layout changes.This change reads that layout, renders controls on the configured side in order, and observes layout changes so the title bar redraws when the user changes desktop settings. It continues to filter minimize/maximize using the window manager's supported-control flags. Windows and macOS retain their current layout and behavior.
This covers the Linux placement and live-update part of #3994. The controls remain GPUI elements styled with GPUI Component theme tokens and icons. The pinned GPUI API exposes button layout, but not GTK/Qt widget CSS, icon themes, or per-control spacing; this PR does not link or embed GTK or Qt widgets.
Validation
cargo test -p gpui-component --lib title_bar::tests— 5 passed.cargo clippy -p gpui-component --lib --tests --no-deps -- -D warnings— passed for the changed crate.cargo fmt --all -- --check— passed.git diff --check— passed.A full workspace Clippy run is currently blocked by the existing
drop_non_dropwarning atcrates/base/src/input/editor/display_map/text_wrapper.rs:924.