Commit 168d201
committed
feat(lock): detect Spotlight and launcher overlays for rules
Launcher overlays (Spotlight, Raycast, Alfred, LaunchBar) take keyboard
focus without changing NSWorkspace.frontmostApplication, so per-app
rules resolved against the app behind them: Spotlight could not be
locked to its own source, and an underlying CJKV lock leaked into the
search field (issue #9).
An Accessibility-gated FloatingAppMonitor now observes the known
launcher processes and reads the system-wide focused UI element to
attribute the real keyboard owner; the engine resolves rules against
that launcher when present and reverts on dismissal. The core lock
stays permission-free — without the grant, behavior is unchanged.
Accessibility now gates two optional features (per-URL enhanced mode
and launcher detection), so its single grant moved to a dedicated
Permissions tab; App Rules and URL Rules show a passive note that
routes there, never a prompt duplicated per feature. The grant
watcher's abandon-stop moved to the Settings window (not a tab switch)
and a status refresh now runs the full grant completion, so switching
tabs mid-grant or granting out-of-band no longer leaves the launcher
monitor unattached.
Signed-off-by: Kevin Cui <bh@bugs.cc>1 parent 44b2954 commit 168d201
15 files changed
Lines changed: 1241 additions & 51 deletions
File tree
- Sources
- LockIMEKit
- AppMonitor
- LockEngine
- LockIME
- UI
- Settings
- Tests/LockIMEKitTests
- Support
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
324 | 328 | | |
325 | 329 | | |
326 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
327 | 336 | | |
328 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
329 | 341 | | |
330 | 342 | | |
331 | 343 | | |
| |||
351 | 363 | | |
352 | 364 | | |
353 | 365 | | |
354 | | - | |
355 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
356 | 379 | | |
357 | 380 | | |
358 | 381 | | |
| |||
0 commit comments