Skip to content

Fix Linux Wayland titlebar controls#1042

Open
R11manish wants to merge 4 commits intocjpais:mainfrom
R11manish:fix/linux-wayland-titlebar-controls
Open

Fix Linux Wayland titlebar controls#1042
R11manish wants to merge 4 commits intocjpais:mainfrom
R11manish:fix/linux-wayland-titlebar-controls

Conversation

@R11manish
Copy link
Copy Markdown

@R11manish R11manish commented Mar 14, 2026

Summary

  • disable native window decorations for the main window on Linux while keeping the existing macOS maximize behavior
  • add a Linux-only in-app titlebar with working drag, minimize, maximize, and close controls
  • render the custom titlebar through the shared app frame so onboarding and permission flows also remain draggable on Linux
  • scope the extra Tauri window-control permissions to the Linux main window only
  • use translated app-name text in the titlebar instead of a hardcoded string or logo asset

Preview

Linux Wayland titlebar preview

Root Cause

On GNOME Wayland, the webview captures pointer events and GTK client-side decoration buttons become non-interactive. GNOME Wayland also does not support server-side decorations, so the app needs its own titlebar controls when running undecorated.

Changes

  • src-tauri/src/lib.rs
    • disable window decorations on Linux
    • restrict .maximizable(false) to macOS
  • src/components/TitleBar.tsx
    • add custom window controls backed by Tauri window APIs
    • start drag explicitly from the title region
  • src/App.tsx
    • move Linux titlebar rendering into the shared app frame
    • keep onboarding and main settings flows inside the same outer layout
  • src/components/onboarding/Onboarding.tsx
  • src/components/onboarding/AccessibilityOnboarding.tsx
    • switch from viewport-sized containers to parent-sized containers so they work inside the shared frame
  • src-tauri/capabilities/main-window-controls.json
    • grant close, minimize, toggle maximize, and start dragging only to the Linux main window
  • src/i18n/locales/en/translation.json
    • add common.appName for titlebar text
  • .github/assets/linux-wayland-titlebar-preview.png
    • add a PR preview screenshot for the Linux titlebar behavior

Validation

  • bun run lint
  • bun run build
  • manually verified on Linux that the titlebar buttons and dragging work

Notes

  • left src/bindings.ts out of this PR because the local change there was an unrelated generated comment update

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 14, 2026

did you take into account windows as well

does this address: #373 ?

@R11manish
Copy link
Copy Markdown
Author

This PR is scoped to Linux Wayland, specifically the GNOME case where the webview captures pointer events and the native titlebar controls become non-interactive.

I did not make any Windows-specific changes here, and I have not tested this on Windows, so I would not claim Windows is covered by this PR.

I use Debian as my daily driver, so I do not currently have a Windows environment available to verify it there.

For #373, this should address it if the issue is the Linux/Wayland titlebar button and drag behavior. I verified the fix on Linux Wayland only.

If you have a Windows setup to test against, that would help confirm whether a separate Windows-specific fix is needed.

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 14, 2026

I meant for windows, that it should not impact windows

I'm hesitant to pull this in without a lot of testers from different distros and x11 too...

@R11manish
Copy link
Copy Markdown
Author

Understood. I do not expect this to change Windows behavior:

  • is only applied on Linux
  • the added window-control capability is scoped to the Linux window
  • the custom titlebar only renders on Linux

So the titlebar/window-control behavior change is intentionally Linux-only.

That said, I understand the hesitation on Linux coverage. I only verified this on Debian GNOME Wayland. I have not tested other distros or X11, so I cannot claim broader Linux coverage from my side.

If you prefer, this could stay scoped as a GNOME Wayland-targeted fix until others can confirm behavior on additional Linux environments.

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 14, 2026

I will ping folks

@github-actions
Copy link
Copy Markdown

🧪 Test Build Ready

Build artifacts for PR #1042 are available for testing.

Download artifacts from workflow run

Artifacts expire after 30 days.

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 14, 2026

linux testers, please try the build above

@BerthalonLucas
@bustozoni
@tanshkoul
@MikeTheGreat

please let me know the results of using this build, your distro, and if you are using x11 or wayland

@tanshkoul
Copy link
Copy Markdown

Writing this using Handy from the requested build that I'm testing. I'm currently running this with Wayland on Ubuntu 25.04 and it's running great. Auto paste and the titlebar change work well. 🚀

@R11manish
Copy link
Copy Markdown
Author

R11manish commented Mar 16, 2026

Tested on X11 and it's working great! @cjpais

Screenshot From 2026-03-16 11-10-34

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 17, 2026

pinging more folks to test, hoping to resolve #373

@lhotari @Nindaleth @muriloime

Mostly the .RPM if it's in the build, I guess the app image is fine?

Also just generally looking if this build works for you before merging it

@Nindaleth
Copy link
Copy Markdown

Nindaleth commented Mar 17, 2026

Using the test build RPM on Fedora 43 GNOME Wayland and it's much better!

I observe the following behavior (everything on title bar):

  • the buttons now hover and react to clicking as expected, that's most important
  • double-clicking doesn't do anything, should it maximize or nothing is expected?
  • only every 2nd click and drag action works - odd ones do and even ones don't
  • consecutive double-click and drag either always works or always doesn't, depending on whether the previous click was an odd one or an even one

@R11manish
Copy link
Copy Markdown
Author

Any updates @cjpais , on merging this pr ?

@Nindaleth
Copy link
Copy Markdown

@R11manish there are two issues described in my last comment, do you observe them too?

@R11manish
Copy link
Copy Markdown
Author

R11manish commented Mar 19, 2026

Can u folks , check it again , earlier i thought its happening with .rpm package
now fixed overall and its workig good as intended @Nindaleth @cjpais

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 19, 2026

Needs more testers, cannot merge with outstanding issues. This is not a priority for me at the moment. Rally Linux folks in discord to test

@github-actions
Copy link
Copy Markdown

🧪 Test Build Ready

Build artifacts for PR #1042 are available for testing.

Download artifacts from workflow run

Artifacts expire after 30 days.

@tanshkoul
Copy link
Copy Markdown

tanshkoul commented Mar 20, 2026

Latest test build runs perfectly on the Ubuntu Wayland, and the previous issues seem resolved. Double clicks and drag actions work as expected on every iteration.

LGTM

@tanshkoul
Copy link
Copy Markdown

tanshkoul commented Mar 20, 2026

@Nindaleth Hey, could you give the latest test build a run on Fedora please?

DylanBricar added a commit to DylanBricar/Phonara that referenced this pull request Mar 20, 2026
- Save recordings before transcription to prevent data loss on crash (cjpais#1024)
- Linux Wayland titlebar: disable decorations for custom titlebar (cjpais#1042)
- Add change_secondary_selected_language_setting command (cjpais#1106 gap)
- Fix CLI --auto-submit key type being ignored (cjpais#1099 bug)
@Nindaleth
Copy link
Copy Markdown

Hey @tanshkoul, I've just checked the latest test build and everything is OK now in the RPM for me, thanks!

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 23, 2026

This will be included in 0.8.1

@R11manish
Copy link
Copy Markdown
Author

0.8.1 is out.. but this still not got merged ?

@VirenMohindra
Copy link
Copy Markdown
Contributor

@R11manish thank you for the contribution! this looks great so far. mind rebasing with main?

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 26, 2026

sorry I just forgot lol

@R11manish R11manish force-pushed the fix/linux-wayland-titlebar-controls branch from efffa5d to b227ec5 Compare March 27, 2026 06:19
@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 27, 2026

@R11manish all good to go?

@R11manish
Copy link
Copy Markdown
Author

hold on this pr , i found one more issue on wayland thats , keys shortcut not working properly , i kind off find a workaround to it , just gimme some more time

@cjpais
Copy link
Copy Markdown
Owner

cjpais commented Mar 27, 2026

ok thanks

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.

5 participants