Skip to content

Mast v0.7.5: working titlebar on KDE Wayland - #54

Merged
stackrats merged 3 commits into
mainfrom
fix/wayland-titlebar
Oct 14, 2026
Merged

stackrats merged 3 commits into
mainfrom
fix/wayland-titlebar

Conversation

@stackrats

@stackrats stackrats commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

What

  • On KDE Plasma under Wayland, the titlebar's minimise, maximise and close did nothing. They didn't respond to hover or clicks, and the bar was taller than other apps' titlebars.
  • Cause: tao 0.35 (Tauri's window layer) swapped the window's titlebar for its own GTK header bar on Wayland. It wrapped that bar in an EventBox with above_child = true, so every pointer event went to the box and none reached the buttons. Dragging worked only because the window handles drags itself. Because it was a header bar, the window also asked for client-side decorations, so KWin never drew its own titlebar.
  • Fix: move Tauri to 2.12.3, which uses tao 0.37. tauri-apps/tao#1218, in tao 0.36, removed that header bar. GTK now requests server-side decorations wherever the compositor offers them, and KWin does. @tauri-apps/api moves to 2.12.3 as well, because the release build rejects mismatched Rust and JS minor versions.
  • Tiling desktops still have no titlebar, through linux_env::wants_no_titlebar. That function's comment wrongly said GTK3 has no server-side decoration support on Wayland. It now says which side draws the bar on which desktop.
  • async-trait 0.1.92: CI's stable toolchain moved to Rust 1.99. Its new double_must_use lint fails on the #[must_use] that async-trait 0.1.91 generates (six errors at RuntimeAdapter), which would turn main red too. 0.1.92 exists to resolve that lint (dtolnay/async-trait#303).
  • Version 0.7.5.

Verified

  • On a Plasma 6 Wayland session (Ubuntu 26.04, GTK 3.24.52), with WAYLAND_DEBUG=1:
    • The installed 0.7.4 sends org_kde_kwin_server_decoration.request_mode(1), which is client-side.
    • This build sends request_mode(2), and KWin replies mode(2).
    • The window geometry is now the content alone (1100×720).
  • cargo clippy --workspace --all-targets -D warnings is clean on Rust 1.96 and on 1.99 (CI's current stable).
  • vp check is clean, and vp test passes 192 tests.
  • cargo test --workspace passes, apart from one failure of project_removal_blocks_new_commands_until_shutdown_finishes while the machine was under load. It passed on four reruns of the full engine suite. mast-engine's dependency tree is identical to main, so that failure isn't caused by this change.
  • Not tested on Hyprland. There, the titlebar is still removed by set_decorations(false) after the window is created.

On Plasma under Wayland the titlebar's minimise, maximise and close did
nothing — no hover, no click — and the bar stood taller than every other
window's. Neither was GTK's doing: tao 0.35 replaced the window's titlebar
on Wayland with its own GTK header bar, wrapped in an event box set above
its children, so every pointer event landed on the box and none reached
the buttons. Dragging still worked only because the window handles that
itself. And being a header bar, it asked for client-side decorations, so
KWin never drew its own.

tao 0.36 (tauri-apps/tao#1218) dropped that header bar and leaves the
choice to GTK, which asks for server-side decorations through KDE's
protocol wherever the compositor offers it. Tauri 2.12 carries tao 0.37,
so this moves Tauri to 2.12.3 and @tauri-apps/api with it — the release
build refuses mismatched Rust and JS minors.

Run against this Plasma session with WAYLAND_DEBUG, 0.7.4 sends
request_mode(1), client-side; this build sends request_mode(2) and KWin
answers mode(2), drawing a Breeze titlebar over a window whose geometry
is now the content alone. Desktops that tile still lose the titlebar via
linux_env::wants_no_titlebar, whose comment claimed GTK3 had no
server-side decoration support on Wayland at all — it does, and the
comment now says who draws the bar where.
CI's stable toolchain moved to Rust 1.99, whose new double_must_use lint
fires on the #[must_use] async-trait 0.1.91 puts on every generated
method — six errors at RuntimeAdapter's attribute, none of them in code
written here, and enough to stop clippy before it reached any crate that
depends on mast-docker. async-trait 0.1.92 exists to resolve exactly
that lint (dtolnay/async-trait#303). With it, clippy 1.99 runs clean
across the whole workspace with -D warnings.
@stackrats
stackrats merged commit 5f52697 into main Oct 14, 2026
6 checks passed
@stackrats stackrats mentioned this pull request Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant