Repository navigation
feat(linux): the window's controls sit in the titlebar row under Rune's own frame - #1183
Merged
Merged
Conversation
…'s own frame On GNOME under Wayland the compositor draws no window frame, and the window had a second bar above the app's own tab row. Once Rune draws its own frame there (anomalyco/rune#591), `Cx::chrome_insets` has a height on Linux, and the shell takes Windows' layout: a 44 pt titlebar row in every tab layout, with the app menu (and the sidebar toggle beside side tabs) at its start and room for the window's buttons at its end, or at its start where the desktop puts them left. A narrow window keeps that row at its top. Under X11 and under compositors that draw the frame themselves (KDE, Sway, Hyprland) the insets stay zero and nothing changes; neither do macOS and Windows. Until the Rune pin holds the frame this does nothing on Linux either. OpenCode Desktop keeps the system's frame on Linux, so this row is a difference from it. The layout is the one zce's proof of concept for #1146 showed. Co-authored-by: Lei <[email protected]>
This was referenced Nov 25, 2026
Closed
|
I ran the #1184 build on a real GNOME desktop (Fedora 45, GNOME 51.1, Wayland). The single 44 pt row, the close-only default and live The one gap is real-pointer titlebar drag, edge resize and double-click maximize: |
|
Follow-up from the same real-GNOME run: double-clicking the titlebar does not toggle maximize/restore. The row itself is fine — the first press hands the drag to Mutter before the second press can arrive, which is Rune's side, reported at anomalyco/rune#2244 (comment). |
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.
On GNOME under Wayland the window had a second bar above OpenCode's own tab row. With Rune's own frame (anomalyco/rune#2244) the window's buttons sit in the titlebar row instead, as on Windows. Refs #1146.
The Rune pin on
devholds anomalyco/rune#2244 since #1257, so this change is what puts the buttons in the row. Under a native frame it changes nothing (Cx::chrome_insetsstays zero there).What changes
+, window buttonsshell/view/chrome.rs:caption_row= Windows, or Linux withchrome_insets().height > 0. Then the row is Windows' (44 pt at every layout, 1 pt above the panels). A narrow window's row stays at the top there: along the foot the buttons would sit over the panels.shell/view/titlebar.rs: the row's leading padding followscaption_row, not the platform.chrome_insets().trailing, or.leadingwhere the desktop puts them on the left: the row already kept clear of both.Verification
Headless mutter; not shown on a real GNOME desktop.
5d7b4cb3d: plan, guardrails, macOS, Windows x64, Windows arm64, and Linux x64 green; Linux arm64 skipped.0.0.0-pr-1183-2626, software rendering, no override variable):y=0..43, content border aty=44); app menu, Home, Search, tab,+on the left; minimize, maximize, close once on the right, no overlap; zero decoration requests.y=22): held drag moved the window at all three points (after+, middle of gap, 20 pt left of minimize); double click maximized (0,32 1600x968) and restored (100,150 1200x800).set_maximized, restore icon shown) and back (unset_maximized); right click opened mutter's window menu (show_window_menu); Minimize (set_minimized); Close exited 0.--tab-layout vertical): one 44 px bar with app menu, sidebar toggle, and the three buttons; panels directly under it; drag moved the window; Maximize and restore worked; Close exited 0.Difference from OpenCode Desktop
Desktop keeps the system's frame on Linux (
packages/desktop/src/main/windows/defaults.ts:platformFramesets nothing there), so it has the two bars on GNOME. One row is ours.Not covered
button-layout: no settings portal answered in the headless run, so Rune's three-button fallback ran instead of GNOME's default close-only layout (covered by unit test in Rune).The row layout is the one @zce's proof of concept showed. Thank you.