fix(linux): custom window chrome no longer stacks with the native frame on Wayland #51
Open
jared
wants to merge 1 commits from
fix/linux-custom-chrome into main
pull from: fix/linux-custom-chrome
merge into: :main
:main
:fix/smoke-listen-check
:fix/linux-custom-chrome
:ci/smoke-keychain-race
:chore/rust-security-deps
:ci/smoke-keychain
:ci/smoke-native-commands
:ci/smoke-deeplink
:ci/smoke-update-over-running
:feat/linux-checksums
:fix/no-tray-host
:docs/readme-lotus
:fix/csp-widgets
:desktop-keychain
:fix-linux-pkg-update
:smoke-foreign-origin
:desktop-call-origin
:webview-permission-origin
:ci-windows-smoke
:desktop-status-banner
:nvidia-explicit-sync
:linux-nvidia-wayland
:dependabot/github_actions/actions/checkout-6.0.3
:test-updater
:release-v4.12.2
:release-v4.12.1
:semantic-release
:renovate/softprops-action-gh-release-digest
No Reviewers
Labels
Clear labels
area: config
area: hotkeys
area: native
area: tray
area: updater
blocked: upstream
bug
enhancement
needs-human-review
priority: high
priority: low
priority: medium
qa
research
security
ux
Bundled config / CSP / build settings
Waiting on a third party (upstream project, distro, vendor); not ours to fix
Security or privacy
User experience
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/cinny-desktop#51
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported on CachyOS (KDE Plasma, Wayland): turning on Custom window chrome (beta) kept KDE's frame and drew the Lotus titlebar inside it, so there were two sets of close, minimize and maximize buttons. Both sets worked.
Cause
tao applies
set_decorations(false)at runtime withgtk_window_set_decorated. On native Wayland, GTK3 negotiates server- or client-side decorations with the compositor only when the window is created; a laterset_decorateddoesn't renegotiate. So KDE kept drawing its frame. Turning the setting off would have hit the same problem the other way: the Lotus titlebar goes away, but the window stays frameless until restart, leaving no titlebar at all.Fix
custom-chromein the app config dir, likestart-minimized). On Linux the main window is built with or without the frame from it. Building undecorated is the path that works on KDE and GNOME Wayland.set_custom_chromestill toggles at runtime where that works: Windows (unchanged, including the Mica handling), macOS, and Linux on X11 / XWayland. On native Wayland it only saves the choice, which applies on the next launch.fix/linux-custom-chrome) shows its titlebar only then, so there are never two titlebars or none. Older cinny ignores the return value. Newer cinny with an older desktop falls back to the setting.gpu_workarounds.rsinto a sharedgtk_native_waylandhelper.decidestill behaves the same, and all its existing tests pass unchanged.Tests
cargo test --lib: 38/38, including a newruntime_toggle_workstest.x86_64-pc-windows-gnu.On CachyOS after this ships
Turn the setting on: after the reload you get the native frame only (no duplicate). Restart: the Lotus titlebar only. Turning it off works the same way in reverse.
Known limit, unchanged by this PR: a frameless GTK window on Wayland has no resize edges. Resize with the compositor shortcut (KDE: Alt + right-drag) or by maximizing.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.