From c3c89a80b90a24ae330c123e012c53fe5e29a120 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Wed, 25 Feb 2026 17:13:56 -0800 Subject: [PATCH] Treat nil drag-handle hit-test events as passive Refs CMUXTERM-MACOS-AF Refs CMUXTERM-MACOS-A8 --- Sources/WindowDragHandleView.swift | 2 +- cmuxTests/CmuxWebViewKeyEquivalentTests.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/WindowDragHandleView.swift b/Sources/WindowDragHandleView.swift index 82534727..833b5769 100644 --- a/Sources/WindowDragHandleView.swift +++ b/Sources/WindowDragHandleView.swift @@ -8,7 +8,7 @@ private func windowDragHandleFormatPoint(_ point: NSPoint) -> String { private func windowDragHandleShouldDeferHitCapture(for eventType: NSEvent.EventType?) -> Bool { switch eventType { - case .mouseMoved?, .cursorUpdate?: + case nil, .mouseMoved?, .cursorUpdate?: return true default: return false diff --git a/cmuxTests/CmuxWebViewKeyEquivalentTests.swift b/cmuxTests/CmuxWebViewKeyEquivalentTests.swift index 5a783abe..6ec678bf 100644 --- a/cmuxTests/CmuxWebViewKeyEquivalentTests.swift +++ b/cmuxTests/CmuxWebViewKeyEquivalentTests.swift @@ -5973,6 +5973,7 @@ final class WindowDragHandleHitTests: XCTestCase { let point = NSPoint(x: 180, y: 18) XCTAssertFalse(windowDragHandleShouldCaptureHit(point, in: dragHandle, eventType: .mouseMoved)) XCTAssertFalse(windowDragHandleShouldCaptureHit(point, in: dragHandle, eventType: .cursorUpdate)) + XCTAssertFalse(windowDragHandleShouldCaptureHit(point, in: dragHandle, eventType: nil)) XCTAssertTrue(windowDragHandleShouldCaptureHit(point, in: dragHandle, eventType: .leftMouseDown)) }