app-engine: install the event tap when the permission finally arrives
The 5 s health check already had to notice Input Monitoring being revoked (contracts C2). Noticing it being granted and retrying EventTap.start() means a first run does not have to be restarted after the user ticks the box in System Settings. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
1 parent
fc7a54b40a
commit
bb873807b8
2 files changed
+22
-3
No files matched your search
@@ -392,7 +392,12 @@ Rules the consuming lanes must honour:
|
||||
jerked the pointer to the top of the screen whenever `.tapLost` or a
|
||||
revoked grant fired while control was already local. `nil` means
|
||||
"show and re-associate, do not move", and it is idempotent.
|
||||
6. **`DispatchSourceSignal`, not `signal(2)`.** A C signal handler may
|
||||
6. **The permission health check installs the tap, not just reports it.**
|
||||
The 5 s check already had to notice a *revoked* grant (C2); noticing
|
||||
the grant arriving and retrying `EventTap.start()` costs four lines
|
||||
and means the user does not have to restart the app after ticking
|
||||
the box in System Settings.
|
||||
7. **`DispatchSourceSignal`, not `signal(2)`.** A C signal handler may
|
||||
only call async-signal-safe functions, and the emergency release
|
||||
does `queue.sync` and posts `CGEvent`s. A dispatch signal source
|
||||
runs the same code on an ordinary queue, which is both safe and
|
||||
|
||||
Reference in new issue
Block a user