From a4ca2963a20235d9275c84aa4a5111a75c1614bf Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Fri, 2 Feb 2024 03:00:43 -0500 Subject: [PATCH] fix(macOS): Prevent squash/stretch during resize --- macos/Sources/Ghostty/SurfaceView.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index be7cd9e6e..311861d2e 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -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