Commit eb4e016
committed
fix(gui): quit when the daemon's IPC connection drops
When the daemon child exits unexpectedly — most often because its
CGEventTap died after macOS Accessibility was revoked, see
input-capture/src/macos.rs::ProducerEvent::EventTapDisabled — the
IPC connection it was holding open closes. The GUI's frontend-event
loop now detects this via receiver.recv() returning Err and routes
through request_quit_with_backstop instead of staying alive with a
dead daemon.
Routing through the backstop (rather than a raw process::exit(1))
gives the macOS quit path its 5-second force-exit safety net, so a
wedged GTK main loop during shutdown still terminates cleanly. On
non-macOS platforms it falls through to a plain app.quit().
Closes the second leg of the AX-revoke detection chain: tap dies →
daemon exits → IPC drops → GUI quits → all kernel taps released.1 parent 3d24993 commit eb4e016
3 files changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
364 | 366 | | |
365 | 367 | | |
366 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
367 | 385 | | |
368 | 386 | | |
369 | 387 | | |
| |||
0 commit comments