From 29541f74a4b9c9dedd51ac310acdf1299c0e4024 Mon Sep 17 00:00:00 2001 From: Morten Trydal Date: Wed, 18 Mar 2026 22:58:46 +0100 Subject: [PATCH 1/2] Bump Ghostty to v1.3.1 --- ghostty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghostty b/ghostty index 703d11c..332b2ae 160000 --- a/ghostty +++ b/ghostty @@ -1 +1 @@ -Subproject commit 703d11c642a96af9e54b55b04f131bf3888948a9 +Subproject commit 332b2aefc6e72d363aa93ab6ecfc86eeeeb5ed28 From 45644a9093c6b2ac3eaad5a8fe0670e2f4e2b85b Mon Sep 17 00:00:00 2001 From: Morten Trydal Date: Wed, 18 Mar 2026 23:10:17 +0100 Subject: [PATCH 2/2] Fix Ghostty clipboard callback ABI --- .../Infrastructure/Ghostty/GhosttyRuntime.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Sources/Shellraiser/Infrastructure/Ghostty/GhosttyRuntime.swift b/Sources/Shellraiser/Infrastructure/Ghostty/GhosttyRuntime.swift index a1b169c..7babe79 100644 --- a/Sources/Shellraiser/Infrastructure/Ghostty/GhosttyRuntime.swift +++ b/Sources/Shellraiser/Infrastructure/Ghostty/GhosttyRuntime.swift @@ -711,13 +711,15 @@ final class GhosttyRuntime { } } - /// Reads text from the host pasteboard and completes a pending Ghostty request. + /// Accepts a Ghostty clipboard-read request and completes it on the main actor. + /// + /// Returns `false` only when the runtime cannot take ownership of the request at all. nonisolated private static func readClipboard( userdata: UnsafeMutableRawPointer?, clipboard: ghostty_clipboard_e, requestState: UnsafeMutableRawPointer? - ) { - guard let hostView = hostView(from: userdata) else { return } + ) -> Bool { + guard let hostView = hostView(from: userdata) else { return false } Task { @MainActor in guard let surface = hostView.surfaceHandleForCallbacks else { return } @@ -731,6 +733,8 @@ final class GhosttyRuntime { let text = pasteboard.opinionatedStringContents ?? "" completeClipboardRequest(surface: surface, text: text, requestState: requestState) } + + return true } /// Handles clipboard-read confirmation requests conservatively by denying them.