mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-03 16:36:32 +00:00
Move title change timer to SurfaceView and call it from Ghostty.App instead of terminal controllers
This commit is contained in:
@@ -53,10 +53,6 @@ class BaseTerminalController: NSWindowController,
|
||||
|
||||
/// Fullscreen state management.
|
||||
private(set) var fullscreenStyle: FullscreenStyle?
|
||||
|
||||
var titleChangeDelay: TimeInterval = 0.075
|
||||
|
||||
private var titleChangeTimer: Timer?
|
||||
|
||||
/// Event monitor (see individual events for why)
|
||||
private var eventMonitor: Any? = nil
|
||||
@@ -264,12 +260,9 @@ class BaseTerminalController: NSWindowController,
|
||||
func titleDidChange(to: String) {
|
||||
guard let window else { return }
|
||||
|
||||
titleChangeTimer?.invalidate()
|
||||
// Set the main window title
|
||||
window.title = to
|
||||
|
||||
// Set the main window title after a small delay to prevent flicker
|
||||
titleChangeTimer = Timer.scheduledTimer(withTimeInterval: titleChangeDelay, repeats: false) { _ in
|
||||
window.title = to
|
||||
}
|
||||
}
|
||||
|
||||
func pwdDidChange(to: URL?) {
|
||||
|
Reference in New Issue
Block a user