From 0420be9fa5e2569328626ebb8cae07f9db1c7e8c Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 22 Jul 2026 12:56:35 +0200 Subject: [PATCH] fix(apple/cursor): reset per-session cursor-channel state in stop() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cursorChannelActive/hostCursors/cursorState stayed latched across sessions — a next session against a host WITHOUT the cursor cap would wear the previous session's stale shapes via resetCursorRects. Co-Authored-By: Claude Opus 4.8 (1M context) --- clients/apple/Sources/PunktfunkKit/Views/StreamView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clients/apple/Sources/PunktfunkKit/Views/StreamView.swift b/clients/apple/Sources/PunktfunkKit/Views/StreamView.swift index 9c727e6d..8d8abdb7 100644 --- a/clients/apple/Sources/PunktfunkKit/Views/StreamView.swift +++ b/clients/apple/Sources/PunktfunkKit/Views/StreamView.swift @@ -917,6 +917,13 @@ public final class StreamLayerView: NSView { matchFollower = nil lastDecodedContentSize = nil // the next session re-derives it from its first frame connection = nil + // Cursor-channel state is per-session: without this reset a next session against a + // host WITHOUT the cap would wear this session's stale shapes (`cursorChannelActive` + // stayed latched true across sessions). + cursorChannelActive = false + cursorState = nil + hostCursors.removeAll() + window?.invalidateCursorRects(for: self) } deinit {