From cbcd52846c8d725ee87de99dc32b707d68a556cf Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Wed, 26 Nov 2025 20:59:43 +0100 Subject: [PATCH 1/2] macOS: fix search dragging animation when corner is not changed --- macos/Sources/Ghostty/SurfaceView.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index c3726ad32..66f77637a 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -499,11 +499,13 @@ extension Ghostty { x: centerPos.x + value.translation.width, y: centerPos.y + value.translation.height ) - corner = closestCorner(to: newCenter, in: geo.size) - dragOffset = .zero + let newCorner = closestCorner(to: newCenter, in: geo.size) + withAnimation(.easeOut(duration: 0.2)) { + corner = newCorner + dragOffset = .zero + } } ) - .animation(.easeOut(duration: 0.2), value: corner) } } From dc08d057fe6ec3822c0af94eb58ad4632429e884 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Wed, 26 Nov 2025 21:00:08 +0100 Subject: [PATCH 2/2] macOS: use ConcentricRectangle on Tahoe --- macos/Sources/Ghostty/SurfaceView.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index 66f77637a..6f21c997b 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -469,7 +469,7 @@ extension Ghostty { } .padding(8) .background(.background) - .cornerRadius(8) + .clipShape(clipShape) .shadow(radius: 4) .onAppear { isSearchFieldFocused = true @@ -508,7 +508,15 @@ extension Ghostty { ) } } - + + private var clipShape: some Shape { + if #available(iOS 26.0, macOS 26.0, *) { + return ConcentricRectangle(corners: .concentric(minimum: 8), isUniform: true) + } else { + return RoundedRectangle(cornerRadius: 8) + } + } + enum Corner { case topLeft, topRight, bottomLeft, bottomRight