Skip to content

feat: add --disable-csd and --disable-transparency for Wayland - #1

Merged
3xian merged 1 commit into
3xian:mainfrom
nicobonada:wayland-flags
Sep 2, 2026
Merged

feat: add --disable-csd and --disable-transparency for Wayland#1
3xian merged 1 commit into
3xian:mainfrom
nicobonada:wayland-flags

Conversation

@nicobonada

Copy link
Copy Markdown
Contributor

On Wayland (niri, Sway, Hyprland, and similar), PinkCode's default acrylic + Overlay CSD chrome does not work:

  • GTK client-side decorations show as a black bar.
  • WebKitGTK has no Wayland protocol for alpha compositing, so a transparent window is wrong.

These flags rewrite the window config before the webview is created (transparency cannot be changed after). --disable-csd also sets GTK_CSD=0 before gtk_init.

PinkCode --disable-csd --disable-transparency

macOS and Windows keep the existing Overlay / acrylic defaults unless the flags are passed.

Tested: unit tests for parse + config rewrite. I could not run a full Tauri Linux build in this environment (missing dbus for the GTK stack). Visual check is on niri with the same window settings we already use locally.

On Wayland, WebKitGTK cannot composite an alpha surface, and GTK CSD
renders as a black bar. These flags rewrite the window config before
the webview is created. --disable-csd also sets GTK_CSD=0 before gtk_init.

@3xian 3xian left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation is focused and safe: it rewrites Tauri's window config before webview creation, preserves existing defaults without flags, and has direct tests for parsing and config mutation. Local full checks and a launched-app smoke test pass. Non-blocking wording note: Wayland surfaces can carry alpha, and GTK_CSD=0 only disables GTK's default CSD (Tao 0.35 installs a custom titlebar); describing these as compositor/WebKitGTK compatibility workarounds would be more precise. The effective behavior still comes from decorations=false and transparent=false before window creation.

@3xian 3xian closed this Sep 2, 2026
@3xian 3xian reopened this Sep 2, 2026
@3xian
3xian merged commit 6da7c9d into 3xian:main Sep 2, 2026
@nicobonada
nicobonada deleted the wayland-flags branch September 2, 2026 13:37
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.

2 participants