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)) }