Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Sources/Shellraiser/Infrastructure/Ghostty/GhosttyRuntime.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ghostty
Submodule ghostty updated 53 files
+10 −0 .github/VOUCHED.td
+1 −1 .github/workflows/flatpak.yml
+1 −1 .github/workflows/milestone.yml
+1 −1 .github/workflows/nix.yml
+6 −6 .github/workflows/release-tag.yml
+2 −2 .github/workflows/release-tip.yml
+1 −1 .github/workflows/snap.yml
+32 −30 .github/workflows/test.yml
+1 −1 .github/workflows/update-colorschemes.yml
+1 −1 AGENTS.md
+1 −1 build.zig.zon
+3 −0 dist/linux/com.mitchellh.ghostty.metainfo.xml.in
+6 −26 flake.lock
+0 −2 flake.nix
+3 −1 include/ghostty.h
+2 −0 macos/Ghostty-Info.plist
+4 −1 macos/GhosttyUITests/GhosttyCustomConfigCase.swift
+331 −0 macos/GhosttyUITests/GhosttyWindowPositionUITests.swift
+252 −154 macos/Sources/App/macOS/AppDelegate.swift
+0 −1 macos/Sources/Features/AppleScript/ScriptTab.swift
+57 −48 macos/Sources/Features/Terminal/TerminalController.swift
+1 −1 macos/Sources/Features/Terminal/TerminalView.swift
+16 −4 macos/Sources/Features/Terminal/TerminalViewContainer.swift
+21 −17 macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift
+2 −2 macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift
+54 −10 macos/Sources/Ghostty/Ghostty.App.swift
+17 −4 macos/Sources/Ghostty/Ghostty.Config.swift
+63 −19 macos/Sources/Ghostty/Surface View/SurfaceGrabHandle.swift
+30 −5 macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift
+1 −1 macos/Sources/Helpers/Extensions/NSScreen+Extension.swift
+8 −4 macos/Sources/Helpers/Extensions/NSWindow+Extension.swift
+15 −0 macos/Sources/Helpers/Extensions/UserDefaults+Extension.swift
+34 −7 macos/Sources/Helpers/LastWindowPosition.swift
+2 −2 macos/Sources/Helpers/PermissionRequest.swift
+49 −10 macos/Sources/Helpers/TabTitleEditor.swift
+244 −0 macos/Tests/Ghostty/ConfigTests.swift
+1 −1 nix/package.nix
+21 −1 src/Surface.zig
+4 −0 src/apprt/action.zig
+19 −8 src/apprt/embedded.zig
+25 −0 src/apprt/gtk/class/application.zig
+18 −2 src/apprt/gtk/class/surface.zig
+1 −1 src/apprt/surface.zig
+2 −1 src/cli/new_window.zig
+1 −0 src/config.zig
+193 −32 src/config/Config.zig
+184 −175 src/font/shaper/harfbuzz.zig
+34 −0 src/input/Binding.zig
+2 −0 src/input/command.zig
+12 −0 src/os/open.zig
+19 −14 src/shell-integration/bash/ghostty.bash
+52 −28 src/shell-integration/zsh/ghostty-integration
+65 −5 src/terminal/PageList.zig
Loading