Skip to content

fix(tao): keep native KDE decorations on Wayland - #538

Open
kdroidFilter wants to merge 1 commit into
mainfrom
fix/425-kde-wayland-decorations
Open

fix(tao): keep native KDE decorations on Wayland#538
kdroidFilter wants to merge 1 commit into
mainfrom
fix/425-kde-wayland-decorations

Conversation

@kdroidFilter

Copy link
Copy Markdown
Collaborator

Fixes NucleusFramework/ComposeNativeTray#425

🚀 Description

On KDE/Plasma Wayland, DecoratedWindow(undecorated = false) was left with no title bar, borders, or caption buttons.

The Tao Linux path always installed a hidden GtkHeaderBar (yaru-style CSD) so GTK would draw the shadow ring. gtk_window_set_titlebar() latches client-side decorations; KWin then drops server-side decorations. With the header hidden and no Compose TitleBar, the window has no chrome at all.

This PR keeps the native GTK/KWin frame on KDE when the caller asked for decorations. If a Compose TitleBar / WindowScaffold / DialogTitleBar is composed, the native header is hidden (CSD stays latched) so custom chrome does not double up. GNOME still uses the hidden-titlebar CSD path.

📄 Motivation and Context

Reported against ComposeNativeTray with Tray + DecoratedWindow(undecorated = false) on Fedora/KDE Plasma Wayland. The same Nucleus window path is what strips the chrome.

🧪 How Has This Been Tested?

  • ./gradlew :decorated-window-tao:test --tests dev.nucleusframework.window.tao.LinuxNativeDecorationsTest
  • ./gradlew :decorated-window-tao:ktlintMainSourceSetCheck :decorated-window-tao:ktlintTestSourceSetCheck :decorated-window-tao:detekt
  • Native libnucleus_tao.so rebuilt; new nativeLinuxSetTitlebarVisible links.
  • Headful ComposeNativeTray e2e (Issue425ReproTest) against this worktree via includeBuild: TITLEBAR_VISIBLE=true on KDE/Wayland.

📦 Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

✅ Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Hiding the GTK header to latch CSD makes KWin drop server-side
decorations, so DecoratedWindow(undecorated = false) has no title
bar, borders, or caption buttons (ComposeNativeTray #425). Keep
the native frame on KDE and hide it only while Compose chrome is
composed.
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.

[Bug] Window decorations stripped under Wayland (Fedora / KDE Plasma)

1 participant