fix(tauri): remove macOS specific titlebar config from base tauri.con… - #111
Open
Ronak-webdev wants to merge 2 commits into
Open
fix(tauri): remove macOS specific titlebar config from base tauri.con…#111Ronak-webdev wants to merge 2 commits into
Ronak-webdev wants to merge 2 commits into
Conversation
…f.json to fix double titlebar on Windows
There was a problem hiding this comment.
Pull request overview
Removes macOS-specific window titlebar settings from the shared Tauri configuration to prevent Windows from rendering a second native title bar alongside the app’s custom frontend title bar (Fixes #93).
Changes:
- Removed
titleBarStyle: "Overlay"andhiddenTitle: truefrom the basesrc-tauri/tauri.conf.json. - Kept macOS behavior intact by relying on
src-tauri/tauri.macos.conf.json, which still defines these macOS-only properties.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/main.ts:145
- The non-reuse path assumes a Tauri runtime and does a dynamic import of
@tauri-apps/api/coreoutside of any try/catch. In a non-Tauri/browser context (this file already supports non-Tauri execution via try/catch around other Tauri imports), this can reject theworkspaceProvider.openpromise and break opening workspaces in a new window. Guard on__SIDEX_TAURI__(or catch the import) and fall back towindow.openwhen not running in Tauri.
// Open in a new Tauri window
const { invoke } = await import('@tauri-apps/api/core');
const url = new URL(window.location.href);
if (folderUriStr) {
url.searchParams.set('folder', folderUriStr);
src/main.ts:135
- PR description focuses on removing macOS-only
titleBarStyle/hiddenTitlefromtauri.conf.jsonto fix the double title bar issue, but this PR also changes workspace opening behavior by introducing a new-window flow viainvoke('create_window', ...). Please update the PR description (or split the change) so reviewers understand why this behavior change is included with the title bar fix.
// Open in a new Tauri window
const { invoke } = await import('@tauri-apps/api/core');
const url = new URL(window.location.href);
if (folderUriStr) {
url.searchParams.set('folder', folderUriStr);
} else {
url.searchParams.delete('folder');
}
const label = 'window-' + Date.now();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the double title bar issue experienced on Windows.
The base
tauri.conf.jsoncontained macOS-specific configurations (titleBarStyle: OverlayandhiddenTitle: true). These were causing Tauri to render a second native title bar alongside the custom frontend title bar on Windows 11.I have removed these properties from the base
tauri.conf.json. Since they are already properly defined intauri.macos.conf.json, the macOS build remains unaffected, and the issue is resolved on Windows.Fixes #93