@@ -1171,8 +1171,15 @@ extension Ghostty {
1171
1171
menu. addItem ( . separator( ) )
1172
1172
menu. addItem ( withTitle: " Reset Terminal " , action: #selector( resetTerminal ( _: ) ) , keyEquivalent: " " )
1173
1173
menu. addItem ( withTitle: " Toggle Terminal Inspector " , action: #selector( toggleTerminalInspector ( _: ) ) , keyEquivalent: " " )
1174
- menu. addItem ( . separator( ) )
1175
- menu. addItem ( withTitle: " Change Title... " , action: #selector( changeTitle ( _: ) ) , keyEquivalent: " " )
1174
+
1175
+ // Only show Change Title menu item if we have a title bar
1176
+ if let window = self . window,
1177
+ !window. styleMask. contains ( . fullScreen) ,
1178
+ let appDelegate = NSApplication . shared. delegate as? AppDelegate ,
1179
+ appDelegate. ghostty. config. windowDecorations {
1180
+ menu. addItem ( . separator( ) )
1181
+ menu. addItem ( withTitle: " Change Title... " , action: #selector( changeTitle ( _: ) ) , keyEquivalent: " " )
1182
+ }
1176
1183
1177
1184
return menu
1178
1185
}
@@ -1548,6 +1555,11 @@ extension Ghostty.SurfaceView: NSMenuItemValidation {
1548
1555
guard let str = pb. getOpinionatedStringContents ( ) else { return false }
1549
1556
return !str. isEmpty
1550
1557
1558
+ case #selector( changeTitle) :
1559
+ guard let window = self . window,
1560
+ let appDelegate = NSApplication . shared. delegate as? AppDelegate else { return false }
1561
+ return !window. styleMask. contains ( . fullScreen) && appDelegate. ghostty. config. windowDecorations
1562
+
1551
1563
default :
1552
1564
return true
1553
1565
}
0 commit comments