✨ feat(compact-tabs): open Set Window Title on name double-click - #733
Open
kud wants to merge 1 commit into
Open
✨ feat(compact-tabs): open Set Window Title on name double-click#733kud wants to merge 1 commit into
kud wants to merge 1 commit into
Conversation
kud
marked this pull request as ready for review
August 18, 2026 22:01
kud
force-pushed
the
feat/window-name-click-to-edit
branch
3 times, most recently
from
August 24, 2026 15:48
f873e11 to
f9e5f42
Compare
kud
marked this pull request as draft
August 27, 2026 10:43
Contributor
Author
|
Dependency with another PR. I prefer to set it as a draft for now. |
- Add `-[PseudoTerminal rootTerminalViewDidRequestEditWindowName]`, wired to the existing `-editWindowTitle:` action, so the delegate can trigger the rename sheet - `iTermRootTerminalView.m`: `-mouseDown:` now checks `-pointIsInWindowNameBesideTabs:` and, on a double-click, calls the new delegate method instead of forwarding to `-performWindowDragWithEvent:`; single-click/drag on the name still moves the window as before - `-menuForEvent:` keeps returning the tab bar's context menu when right-clicking the name, even though the fake title label is hidden, so right-click behavior is unchanged - `docs/notes-3.7.txt`: document the new double-click-to-edit behavior for the window name beside the tabs
kud
force-pushed
the
feat/window-name-click-to-edit
branch
from
September 3, 2026 10:39
f9e5f42 to
033ebb0
Compare
kud
marked this pull request as ready for review
September 3, 2026 10:40
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
#731 gives the window name a home beside the tabs, but once it's visible there's no way to change it from there — you still have to reach for the Window menu. That's an odd asymmetry: the name is right there, clickable-looking, and clicking it does nothing.
-hitTest:already hands the label the click naturally, because it's a subview sitting on top of the tab bar strip; #731 deliberately forwarded that hit back to_tabBarControlso the label wouldn't intercept drags and double-click-to-zoom. This keeps that forwarding for every other pixel of the strip but lets the name itself keep the hit, then adds a-mouseDown:that reads intent from click count: a double-click asks the delegate to open Set Window Title, anything else calls-performWindowDragWithEvent:— the same call the tab bar strip already relies on to act like a title bar. Because the double-click is spent on the title, the rest of the strip keeps zooming on double-click exactly as before; only the name itself changes behaviour.Double-click rather than single-click is deliberate: a single click on a title bar is how you focus and drag a window, so spending it here would cost that. But the tension is worth stating plainly rather than glossing — elsewhere in iTerm2 a double-click on chrome consistently means zoom or maximise. On the tab bar it zooms the window; on a session title bar it maximises the pane (
-sessionDoubleClickOnTitleBar:→-toggleMaximizeSession:). This change makes the window name the one place that gesture means something else. The case for it is that the name is a specific, labelled target rather than generic chrome, and that single-click is already spoken for — but if you would rather keep the double-click language uniform across the app, a context-menu item on the name is the obvious alternative and I am happy to switch.-menuForEvent:also now returns the tab bar's menu when the point is over the name, so taking the double-click doesn't cost the right-click menu that was there before.Wiring is a single new delegate method,
rootTerminalViewDidRequestEditWindowName, calling straight into the existing-editWindowTitle:action — no new UI, just a second way to reach the one that already exists on the Window menu.PSMTabBarControlstays untouched, as in #731.🔍 Scope
Worth being explicit about one limitation: under the default
showWindowNameBesideTabssetting ("When a custom name is set"), the label doesn't exist until a window already has a name, so this gesture can only ever rename a window — it's never how a window gets named the first time. The Window menu remains the only entry point for that.✅ How to Validate
🛠️ Developer Checklist
tools/build.sh Development)docs/notes-3.7.txt