mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-09 15:48:04 +03:00
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:
committed by
Ferdinand Schober
parent
8a444f98dd
commit
2dc9ebb6cd
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user