macos: hide Reenable warning row once Accessibility is granted

The yellow "input capture is disabled" / "input emulation is disabled"
rows were showing simultaneously with the Relaunch toast after a
live AX grant, double-prompting the user for the same action.

Gate the warning row visibility on Accessibility actually being
missing: when AX is granted but capture/emulation remain inactive,
we're in the pending-relaunch state and the Relaunch toast is the
authoritative prompt. Trigger a status refresh from the AX watcher
so the rows hide the instant AX flips to granted, not when the
daemon next reports status.

On non-macOS platforms the visibility logic is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jon Kinney
2026-04-24 08:54:23 -05:00
parent 06e0c96d67
commit a9cccd95ec
2 changed files with 28 additions and 3 deletions

View File

@@ -274,6 +274,12 @@ fn show_macos_relaunch_dialog(app: &Application, window: &Window) {
// otherwise fires into a surface the user can't see.
window.present();
// Refresh the capture/emulation status rows so the yellow
// "Reenable" warning disappears. It was showing because the daemon
// reports capture/emulation inactive; now that AX is granted the
// Relaunch toast is the right prompt and the warning is redundant.
window.refresh_capture_emulation_status();
let toast = adw::Toast::builder()
.title(
"Accessibility granted. Relaunch Lan Mouse so capture and \