fix: honor buttons-side preference in the classic titlebar#5
Open
p134c0d3 wants to merge 1 commit into
Open
Conversation
The classic (legacy static) titlebar only toggled the visibility of the minimize/maximize/close controls and always kept them in the trailing box. As a result the "Buttons Side" setting had no effect there: the controls stayed pinned to the right even when set to Left. Parse the button-layout into leading/trailing sides and reparent the controls to the chosen edge, reusing the same cluster-side logic as HoverControls so both titlebar modes agree. Also skip reflowing and showing the controls in SSD mode, where the compositor draws the window decorations.
p134c0d3
force-pushed
the
fix/classic-titlebar-buttons-side
branch
from
July 19, 2026 03:55
692be24 to
05416bf
Compare
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.
The classic (legacy static) titlebar honored the Buttons Side setting only for visibility, not placement.
ToolBar.apply_button_layout()toggled the minimize/maximize/close controls on and off but always left them in the trailing box, so switching Buttons Side to Left did nothing — the controls stayed pinned to the right. The floating hover-control path (HoverControls) already handled sides correctly, so the two titlebar modes disagreed.Fix
button-layoutinto leading/trailing sides and reparent the controls to the chosen edge, at the extreme leading/trailing position.HoverControls(close_left || (!close_right && (min_left || max_left))) so both titlebar modes agree.The parsing mirrors the existing
layout.split(":")pattern inhover_controls.vala, so no new warning class is introduced.Testing
meson setup build --buildtype=release && ninja -C build— builds clean (errors: 0).:close) and SSD mode still behave correctly.