feat(panel): dismiss when clicking outside
Close the panel when a mouse-down is sent to another app. The panel observes didResignKey for clicks that make another window key, and installs a transient global mouse-down monitor while visible for clicks outside an open popover or when the panel was not made key. Global monitors ignore events sent to this app, so clicks in the panel and its popover are unaffected; the event is discarded and the monitor is removed on close. Add the dialog guards for recursive close and document the monitor in ADR-009, the architecture, the privacy table and the user guide.\n\nVerified: make verify green; inside clicks keep the panel open; outside clicks close it with closeWithEscape on and off; an outside click while the language popover is open closes both. Replace still works.
This commit is contained in:
1 parent
a3e544fbe4
commit
39ec191348
7 files changed
+61
-9
No files matched your search
@@ -40,6 +40,7 @@ These are hard requirements. The `swift-reviewer` agent checks every change agai
|
||||
| Screen Recording | Nothing | Never requested. No screenshots, no `CGWindowListCreateImage`, no `SCStream`. |
|
||||
| Camera / Microphone | Nothing | Never requested. No `AVCaptureDevice`. |
|
||||
| Apple Events | Nothing | Never requested. No `NSAppleScript` / `AEDeterminePermissionToAutomateTarget`. |
|
||||
| Global mouse-down monitor | Dismiss the translation panel when the click goes to another app | Installed only while the panel is visible and removed on close. The event is discarded; no key events, location, text or app identity are read. Not a key tap and needs no Input Monitoring. |
|
||||
|
||||
## Clipboard rules
|
||||
|
||||
|
||||
Reference in new issue
Block a user