Skip to content

fix(desktop): gate macOS title_bar_style behind cfg for Linux builds#2031

Open
jrtorrez31337 wants to merge 1 commit intokoala73:mainfrom
jrtorrez31337:fix/desktop-linux-build
Open

fix(desktop): gate macOS title_bar_style behind cfg for Linux builds#2031
jrtorrez31337 wants to merge 1 commit intokoala73:mainfrom
jrtorrez31337:fix/desktop-linux-build

Conversation

@jrtorrez31337
Copy link
Copy Markdown
Collaborator

Summary

Saw issue #802 (unable to add API keys on Linux) and started looking into the Linux desktop build situation. The desktop app doesn't compile on Linux because WebviewWindowBuilder::title_bar_style() is a macOS-only Tauri API. Two call sites in main.rs use it unconditionally.

Can only verify Linux for now — don't have a macOS or Windows build environment to confirm those are unaffected.

Changes

  • Split the builder chains for settings and live-channels windows so title_bar_style(TitleBarStyle::Overlay) is only called behind #[cfg(target_os = "macos")]
  • Added #[allow(unused_mut)] to suppress the resulting warning on non-macOS targets where the mut binding is only needed for the cfg-gated reassignment

Test plan

  • cargo tauri build succeeds on Linux (verified in Ubuntu 24.04 container)
  • macOS build still gets the overlay title bar style (not verified, no macOS environment)
  • Windows build unaffected (not verified)

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 21, 2026

@jrtorrez31337 is attempting to deploy a commit to the Elie Team on Vercel.

A member of the Team first needs to authorize it.

@koala73 koala73 added High Value Meaningful contribution to the project Ready to Merge PR is mergeable, passes checks, and adds value labels Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Value Meaningful contribution to the project Ready to Merge PR is mergeable, passes checks, and adds value

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants