| | |
| | | ] |
| | | ) { [weak self] event in |
| | | guard let self, |
| | | self.window != nil, |
| | | event.window === self.window, |
| | | self.handleUsageTipsMouseEvent( |
| | | event, |
| | | triggerButtons: event.type == .leftMouseDown |
| | |
| | | if event.window === window { |
| | | return convert(event.locationInWindow, from: nil) |
| | | } |
| | | guard let window else { return .zero } |
| | | let windowPoint = window.convertPoint(fromScreen: NSEvent.mouseLocation) |
| | | return convert(windowPoint, from: nil) |
| | | return .zero |
| | | } |
| | | |
| | | private func removeUsageTipsMouseMonitor() { |
| | |
| | | if event.window === window { |
| | | return convert(event.locationInWindow, from: nil) |
| | | } |
| | | guard let window else { return .zero } |
| | | let windowPoint = window.convertPoint(fromScreen: NSEvent.mouseLocation) |
| | | return convert(windowPoint, from: nil) |
| | | return .zero |
| | | } |
| | | |
| | | private func setPointerInside(_ inside: Bool) { |