You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GNOME Wayland: put the window controls in OpenCode's titlebar #1146
On Fedora 45 Workstation with GNOME and native Wayland, Rune falls back to winit's Adwaita window decorations. With Top tabs, that puts a separate decoration bar above OpenCode's own tab row. I'd like the layout the Windows build already has: one titlebar with the window controls at the end, without losing titlebar dragging or edge resizing.
The windowing part is already tracked in anomalyco/rune#591. Rune #993, closed as a duplicate, covers the native GNOME Wayland case specifically. OpenCode already sets App::titlebar. Once Rune supplies its own frame on these compositors, the app can use Cx::chrome_insets() to leave room for the controls in both top- and side-tab layouts, while keeping the normal decorations on X11 and on Wayland compositors that provide them.
I have a downstream proof of concept that builds a Fedora RPM against the pinned Rune revision. I checked the top- and side-tab layouts with the offline fixture under Weston in Podman and verified the RPM payload. The local packaging is just a way to try the change; this issue is to track the app-side follow-up when the Rune fix is available.
Prototype screenshot
Top tabs with the integrated window controls, captured using the offline fixture under Weston in Podman.
Buttons follow GNOME's button-layout. On a default GNOME that is close alone, at the right, as in other GNOME apps; with minimize and maximize turned on (Tweaks), or a left-side layout, the row follows, also while the app runs.
Round buttons in place of the Windows-style ones.
Not covered yet: the window has no shadow and square corners on GNOME, and it resizes from a 5 pt band inside its edges, not from outside. Both builds compile on Linux; neither has been run on a real GNOME desktop yet, so that is the next step before anything merges.
Frame status from a real GNOME desktop (Fedora 45, GNOME Shell 51.1, mutter 51.1, Wayland): rune#2360's shadow and rounded corners work with the app's own titlebar; no separate Adwaita bar above the tabs, and no inside resize band.
The 1 pt white border in my earlier pictures was not the frame: sctk-adwaita's ColorTheme::auto() reads org.freedesktop.appearance color-scheme with dbus-send, which this install doesn't have, so a saved System scheme got the light border around a dark app. The fix is zce/rune@7824acd (one commit on dev, proposed in rune#2360) plus #1293 for the app's scheme hand-off. With both, the frame is dark from the first frame and follows a live light/dark switch.
Still open on rune#2360: tiled edges and fractional scaling. The window controls/layout are the remaining piece of this issue; the frame is no longer in their way.
Closing as completed — the integrated GNOME Wayland titlebar controls requested here are already shipped on dev:
App-side titlebar layout (feat(linux): the window's controls sit in the titlebar row under Rune's own frame #1183, da3edd75): On Wayland compositors where Rune draws its own frame (Cx::chrome_insets().height > 0), OpenCode uses a single 44 pt titlebar row across top-tab, side-tab/inbox, and narrow layouts, leaves leading/trailing room for the controls via Cx::chrome_insets(), hides the buttons in F11 full screen while keeping the row, and leaves X11 and server-side-decorated Wayland compositors (KDE, Sway, Hyprland) unchanged.
Rune windowing support (pinned since fix(deps): pin rune to 5342f14d (93 commits): window buttons on Wayland without server decorations, smaller backdrop blur copies #1257, affe876f; dev is now at Rune 09573910): Includes anomalyco/rune#2244 (removes winit's separate Adwaita bar on GNOME Wayland, draws round caption buttons following GNOME's live button-layout via the settings portal, and provides a 5 pt inside resize band), anomalyco/rune#2252 (8 pt drag threshold so titlebar double-click maximizes/restores), anomalyco/rune#2271 (right-click window menu), and anomalyco/rune#2249/#2293 (compositor window actions and tiled edges).
#1183 referenced this issue with Refs #1146 rather than Fixes #1146, so it stayed open after merge.
Window drop shadow, 1 pt border, rounded corners, and 12 pt outside resize handles (replacing the 5 pt inside band)—along with tiled-edge, fractional-scaling, and CSD dark/light theme polish—remain tracked upstream in open draft anomalyco/rune#2360 (chore(deps): NEVER MERGE: Linux proof build of the frame's shadow and rounded corners (follow-up of rune#2244) #1231 is a NEVER MERGE proof build against that branch whose chrome.rs/titlebar.rs diff is already identical to dev). Once anomalyco/rune#2360 lands on Rune dev, a normal Rune dependency bump will pick it up with no further titlebar layout changes needed here.
Please reopen (or file a new issue) if anything in the titlebar controls or layout is still off on current dev.
Activity
Hona commentedon Nov 25, 2026
Thanks for the write-up and the proof of concept, @zce: it made this quick. Two drafts are up:
App::titlebaropens without winit's bar, and Rune draws the window buttons and a resize band itself. X11 and compositors with server-side decorations (KDE, Sway, Hyprland) keep the system frame.Two things differ from your prototype:
button-layout. On a default GNOME that is close alone, at the right, as in other GNOME apps; with minimize and maximize turned on (Tweaks), or a left-side layout, the row follows, also while the app runs.Not covered yet: the window has no shadow and square corners on GNOME, and it resizes from a 5 pt band inside its edges, not from outside. Both builds compile on Linux; neither has been run on a real GNOME desktop yet, so that is the next step before anything merges.
feat(linux): the window's controls sit in the titlebar row under Rune…
feat(linux): the window's controls sit in the titlebar row under Rune…
feat(linux): the window's controls sit in the titlebar row under Rune…
zce commentedon Nov 26, 2026
Frame status from a real GNOME desktop (Fedora 45, GNOME Shell 51.1, mutter 51.1, Wayland): rune#2360's shadow and rounded corners work with the app's own titlebar; no separate Adwaita bar above the tabs, and no inside resize band.
The 1 pt white border in my earlier pictures was not the frame: sctk-adwaita's
ColorTheme::auto()readsorg.freedesktop.appearance color-schemewithdbus-send, which this install doesn't have, so a savedSystemscheme got the light border around a dark app. The fix iszce/rune@7824acd(one commit ondev, proposed in rune#2360) plus #1293 for the app's scheme hand-off. With both, the frame is dark from the first frame and follows a live light/dark switch.Still open on rune#2360: tiled edges and fractional scaling. The window controls/layout are the remaining piece of this issue; the frame is no longer in their way.
Hona commentedon Nov 27, 2026
Closing as completed — the integrated GNOME Wayland titlebar controls requested here are already shipped on
dev:da3edd75): On Wayland compositors where Rune draws its own frame (Cx::chrome_insets().height > 0), OpenCode uses a single 44 pt titlebar row across top-tab, side-tab/inbox, and narrow layouts, leaves leading/trailing room for the controls viaCx::chrome_insets(), hides the buttons in F11 full screen while keeping the row, and leaves X11 and server-side-decorated Wayland compositors (KDE, Sway, Hyprland) unchanged.affe876f;devis now at Rune09573910): Includesanomalyco/rune#2244(removes winit's separate Adwaita bar on GNOME Wayland, draws round caption buttons following GNOME's livebutton-layoutvia the settings portal, and provides a 5 pt inside resize band),anomalyco/rune#2252(8 pt drag threshold so titlebar double-click maximizes/restores),anomalyco/rune#2271(right-click window menu), andanomalyco/rune#2249/#2293(compositor window actions and tiled edges).#1183referenced this issue withRefs #1146rather thanFixes #1146, so it stayed open after merge.Verification & upstream follow-up:
anomalyco/rune#2360(chore(deps): NEVER MERGE: Linux proof build of the frame's shadow and rounded corners (follow-up of rune#2244) #1231 is aNEVER MERGEproof build against that branch whosechrome.rs/titlebar.rsdiff is already identical todev). Onceanomalyco/rune#2360lands on Runedev, a normal Rune dependency bump will pick it up with no further titlebar layout changes needed here.Please reopen (or file a new issue) if anything in the titlebar controls or layout is still off on current
dev.