Conversation
Windows 10 paints the title bar of a dark-mode window pure black while it is active, which clashes with the app's warm dark gray. Apps can't recolor it there: DWMWA_CAPTION_COLOR only exists on Windows 11. Like VS Code and Chrome, the main window is now undecorated on Windows and the frontend draws its own title bar. While active it is a shade darker than the background; while inactive it matches the background, with the title and buttons grayed out. tao keeps the native frame styles on undecorated windows and only trims the caption, so resizing, Aero Snap (cjpais#1778) and the minimize/maximize animations keep working. The bar sits inside the window's inner size, so the window grows by the bar's 32px to keep the content area the same. Top-level layouts, dialogs and the onboarding preview button now start below the bar. Elsewhere --titlebar-height is 0px and nothing changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
arshit09
added a commit
to arshit09/Handy
that referenced
this pull request
Sep 21, 2026
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.
Before Submitting This PR
Human Written Description
When the window is active, it has a pure black title bar, which seems odd and doesn't look like part of the app visually. Following in the footsteps of VS Code, Chrome, Telegram, etc., I got the idea to shade the title bar when active instead of coloring it natively. I've checked other Electron apps like Postman, Discord and Notion to see if they do something else, but they have no active window change at all, which I think is an accessibility and QoL issue. We should have some state change, which is why I decided to move forward with shading the color.
Related Issues/Discussions
None. Found while using the app; no existing issue, PR or discussion covers it. Related: #1778 (maximize and Aero Snap on Windows, which this keeps working) and #1659 (appearance setting reaches the native title bar).
Root Cause & Fix
DWMWA_CAPTION_COLORonly exists on Windows 11.TitleBar.tsxdraws the bar: app icon, title, and minimize/maximize/close buttons using the native Segoe MDL2 / Fluent glyphs. While active, the bar is a shade darker than the background (#222120dark,#eeeeeelight, from a new--color-titlebar-activetoken intheme.css). While inactive, it matches the background and the title and buttons turn gray.data-tauri-drag-region. Close goes throughCloseRequested, so it still hides to the tray.focus/blurevents anddocument.hasFocus(). WebView2 holds keyboard focus while the window is active, and Tauri'sisFocused()checks the parent window, which never has focus while the webview does.#rootscrolls below the bar instead of the document. Top-levelh-screenlayouts use a newh-apputility, and the dialog backdrops and onboarding preview button start below the bar.--titlebar-heightis0pxon macOS and Linux, so nothing changes there.windows-titlebar.jsoncapability (Windows, main window only) allows start-dragging, minimize, toggle-maximize and close. The button labels (titleBar.*) are translated in all 26 locales.Main files:
src/components/TitleBar.tsx(new),src-tauri/src/lib.rs,src/main.tsx,src/App.css,src/styles/theme.css.Community Feedback
None yet. Visual change on Windows only; macOS and Linux keep their native title bars.
Testing
bunx tsc --noEmit, ESLint, Prettier,bun run check:translationsandvite buildpass;cargo fmt --checkandcargo clippyshow nothing new#222120over#2c2b29content, inactive bar#2c2b29with gray title and buttons, no border line along the top edgeScreenshots/Videos (if applicable)
AI Assistance
If AI was used:
🤖 Generated with Claude Code