From 43b4ed5bc0c20d6a39d20260a924c308f065d43e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 12 Dec 2025 14:12:02 -0800 Subject: [PATCH] macos: only show readonly badge on AppKit --- macos/Sources/Ghostty/SurfaceView.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index 3bdcaafe6..eaf935df9 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -103,14 +103,7 @@ extension Ghostty { } } .ghosttySurfaceView(surfaceView) - - // Readonly indicator badge - if surfaceView.readonly { - ReadonlyBadge { - surfaceView.toggleReadonly(nil) - } - } - + .allowsHitTesting(false) // Progress report if let progressReport = surfaceView.progressReport, progressReport.state != .remove { VStack(spacing: 0) { @@ -123,6 +116,13 @@ extension Ghostty { } #if canImport(AppKit) + // Readonly indicator badge + if surfaceView.readonly { + ReadonlyBadge { + surfaceView.toggleReadonly(nil) + } + } + // If we are in the middle of a key sequence, then we show a visual element. We only // support this on macOS currently although in theory we can support mobile with keyboards! if !surfaceView.keySequence.isEmpty {