macos: proper title when focusing the inspector

This commit is contained in:
Mitchell Hashimoto
2023-10-19 14:34:28 -07:00
parent ddd7ff4bbb
commit b2fd3fae6c

View File

@ -15,6 +15,8 @@ extension Ghostty {
SurfaceWrapper(surfaceView: surfaceView, isSplit: isSplit)
}, right: {
InspectorViewRepresentable(surfaceView: surfaceView)
.focusedValue(\.ghosttySurfaceTitle, surfaceView.title)
.focusedValue(\.ghosttySurfaceView, surfaceView)
})
}
}
@ -34,6 +36,7 @@ extension Ghostty {
}
}
/// Inspector view is the view for the surface inspector (similar to a web inspector).
class InspectorView: MTKView, NSTextInputClient {
let commandQueue: MTLCommandQueue