// // KMBrowserWindow.swift // PDF Reader Pro // // Created by tangchao on 2024/4/1. // import Cocoa class KMBrowserWindow: CTBrowserWindow { override func sendEvent(_ event: NSEvent) { if event.type == .leftMouseDown || event.type == .rightMouseDown || event.type == .keyDown { KMImageToolTipWindow.shared.orderOut(nil) } super.sendEvent(event) } override func resignMain() { KMImageToolTipWindow.shared.orderOut(nil) super.resignMain() } override func resignKey() { KMImageToolTipWindow.shared.orderOut(nil) super.resignKey() } }