Skip to content

feat(titlebar): add custom title bar option for the main window on Windows - #1869

Merged
Psychotoxical merged 1 commit into
mainfrom
feat/windows-custom-titlebar
Nov 16, 2026
Merged

Psychotoxical merged 1 commit into
mainfrom
feat/windows-custom-titlebar

Conversation

@Psychotoxical

Copy link
Copy Markdown
Member

Closes #1859

Summary

Windows users can now replace the native caption bar of the main window with the in-page title bar that Linux already has.

  • The existing Custom title bar toggle (Settings → Appearance → Window) is now shown on Windows as well, together with the window button style picker and the minimize button option.
  • With the toggle on, native decorations are turned off at runtime and the in-page TitleBar (drag region, now-playing label, minimize / maximize / close) takes over. Turning it off brings the native caption bar back.
  • Off by default, so existing Windows installs look exactly as before.
  • New locale key useCustomTitlebarDescWindows in all 16 locales; the Linux description mentions GNOME/GTK, so Windows gets its own wording.

Implementation

  • usePlatformShellSetup: the serialized decoration transition (mount custom bar first, then drop native decorations; restore on unmount) now runs on Linux and Windows. Tiling-WM detection stays Linux-only; on Windows isTilingWm starts as false.
  • AppShell: adds showWindowsTitlebar and data-titlebar-platform="windows". The Linux resize-grip decoration stays scoped to linux.
  • The hook's state is renamed from linuxCustomTitlebarActive to customTitlebarActive.
  • No Rust changes: set_window_decorations was already platform-neutral.

Testing

  • New usePlatformShellSetup.windows.test.ts: enable, keep native when off, restore on unmount, no tiling-WM probe on Windows.
  • Existing Linux hook tests unchanged apart from the rename.
  • tsc --noEmit, ESLint, cargo fmt --all --check clean; Vitest for src/app, src/features/settings, src/store, src/locales green, except AddServerForm.test.tsx failing 3 tests in that combined run; it passes on its own on both this branch and main.
  • Manually checked in tauri dev on Windows 11 (toggle on and off).

Runtime benchmark

  • Applicability: required (application shell; Windows startup now sends one set_window_decorations call, a no-op while the toggle is off)
  • Baseline: fdc9f084 (main), plus main + one comment line as noise control
  • Final: f2e6d055
  • Command: psysonic benchmark run --scenario core-pages --runs 2 --profile realistic --json
  • Order: main → main+comment → branch → branch → main, fresh DB copy per run
  • Result (medianTotalMs, main / control / branch / branch / main):
Route main control branch branch main
/ 9065 5589 5594 5820 8463
/favorites 2183 1708 1668 1662 2278
/artists 1783 1811 2227 1764 1772
/tracks 1666 1994 5533 4562 5261
/albums 1211 1163 1199 1206 1241
  • Renderer startup (migrationReadyMs): main 5996 / control 5530 / branch 5544, 5197 / main 5594.
  • No route has both branch medians above the slower main run. /tracks and home are bimodal on this machine (main itself ranges 1666–5261 and 8463–9065), so those two are not separable; no regression found.
  • Timeouts/errors: none.

Windows users can now replace the native caption bar of the main window
with the in-page title bar that Linux already offers. The existing
"Custom title bar" toggle (Settings > Appearance > Window) is shown on
Windows too, with a Windows-specific description in every locale. It is
off by default, so nothing changes for existing installs.

The decoration transition logic in usePlatformShellSetup now runs on
Windows as well; tiling-WM detection stays Linux-only.

Closes #1859
@Psychotoxical Psychotoxical changed the title Add custom title bar option for the main window on Windows feat(titlebar): add custom title bar option for the main window on Windows Nov 16, 2026
@Psychotoxical
Psychotoxical merged commit 80f83f4 into main Nov 16, 2026
6 checks passed
@Psychotoxical
Psychotoxical deleted the feat/windows-custom-titlebar branch November 16, 2026 19:45
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.

[Feature]: Option to hide the native title bar on Windows

1 participant