.../Source/Components/Popup/PopupControllerWindowDelegate.swift
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // PopupControllerWindowDelegate.swift |
3 | | // CutBox |
4 | | // |
5 | | // Created by Jason Milkins on 31/3/18. |
6 | | // Copyright © 2018-2023 ocodo. All rights reserved. |
7 | | // |
8 | | |
9 | | import Cocoa |
10 | | |
11 | | extension PopupController: NSWindowDelegate { |
12 | | |
13 | 1 | func windowWillClose(_ notification: Notification) { |
14 | 1 | closePopup() |
15 | 1 | } |
16 | | |
17 | 2 | func windowDidResignKey(_ notification: Notification) { |
18 | 2 | if window?.isVisible == true && !isOpening { |
19 | 0 | closePopup() |
20 | 2 | } |
21 | 2 | } |
22 | | } |