fix(macOS): Prevent squash/stretch during resize

This commit is contained in:
Qwerasd
2024-02-02 03:00:43 -05:00
parent c92e0ccf4d
commit a4ca2963a2

View File

@ -118,6 +118,9 @@ extension Ghostty {
}
}
.onAppear() {
// Prevent macOS from stretching rendered frames when the view is resized.
surfaceView.layerContentsPlacement = .topLeft
// Welcome to the SwiftUI bug house of horrors. On macOS 12 (at least
// 12.5.1, didn't test other versions), the order in which the view
// is added to the window hierarchy is such that $surfaceFocus is