mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-02 16:08:39 +00:00
feat: focusSurface for quick terminal
This commit is contained in:
@@ -247,6 +247,18 @@ class QuickTerminalController: BaseTerminalController {
|
|||||||
|
|
||||||
// MARK: Base Controller Overrides
|
// MARK: Base Controller Overrides
|
||||||
|
|
||||||
|
override func focusSurface(_ view: Ghostty.SurfaceView) {
|
||||||
|
if visible {
|
||||||
|
// If we're visible, we just focus the surface as normal.
|
||||||
|
super.focusSurface(view)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
animateIn()
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + derivedConfig.quickTerminalAnimationDuration) {
|
||||||
|
super.focusSurface(view)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func surfaceTreeDidChange(from: SplitTree<Ghostty.SurfaceView>, to: SplitTree<Ghostty.SurfaceView>) {
|
override func surfaceTreeDidChange(from: SplitTree<Ghostty.SurfaceView>, to: SplitTree<Ghostty.SurfaceView>) {
|
||||||
super.surfaceTreeDidChange(from: from, to: to)
|
super.surfaceTreeDidChange(from: from, to: to)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user