-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix #5099: titlebar band swallows right-sidebar button clicks #5102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2416,6 +2416,18 @@ struct ContentView: View { | |
| .frame(maxWidth: .infinity) | ||
| .overlay(alignment: .topLeading) { | ||
| customTitlebar(appearance: appearance) | ||
| // The workspace titlebar band spans the full window width and sits at | ||
| // zIndex(100) over the content/sidebar layout. Its drag/double-click | ||
| // surface (`WindowDragHandleView` + `.contentShape(Rectangle())`) must | ||
| // not cover the right sidebar, whose mode bar (Files/Search/Feed/Vault) | ||
| // lives inside the titlebar-height strip — otherwise the band wins the | ||
| // hit-test and swallows every click/hover on those buttons (#5099). | ||
| // Confine the interactive titlebar surface to the area left of the | ||
| // right sidebar, matching the pre-#5017 "only over terminal content, | ||
| // not the sidebar" intent. The left sidebar's titlebar controls live in | ||
| // the AppKit titlebar accessory (above this band), so only the trailing | ||
| // (right-sidebar) edge needs to be ceded here. | ||
| .padding(.trailing, rightSidebarVisible ? rightSidebarWidth : 0) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in e386c2f: added — Claude Code |
||
| } | ||
| .overlay(alignment: .topLeading) { | ||
| if isFullScreen && sidebarState.isVisible { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rightSidebarWidthis already computed asrightSidebarVisible ? fileExplorerWidth : 0, sorightSidebarVisible ? rightSidebarWidth : 0always equalsrightSidebarWidth. UsingrightSidebarWidthdirectly also keeps this line consistent with how the same property is used elsewhere (e.g..frame(width: rightSidebarWidth)on the panel).Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch — simplified to
.padding(.trailing, rightSidebarWidth)in e386c2f, sincerightSidebarWidthalready evaluates to 0 when the sidebar is hidden.— Claude Code