Commit Graph

24 Commits

Author SHA1 Message Date
Jon Kinney
5e79743bd0 macos: per-pane TCC navigation and Sequoia-tolerant permission flow
On macOS the three TCC grants (Accessibility, Input Monitoring, Post
Event) live in separate Privacy panes. Before this change the
"Reenable" row sent the user to Accessibility regardless of which
grant was actually missing, and the daemon's own permission checks
re-fired the Accessibility prompt on every retry.

- lan-mouse-gtk/src/macos_privacy.rs: new module that exposes silent
  preflight checks (AXIsProcessTrusted, CGPreflightListenEventAccess,
  CGPreflightPostEventAccess), per-pane URL-scheme navigation, and
  a Once-guarded fire_initial_prompts() called from build_ui. The
  initial-prompt path only fires the Accessibility prompt if AX is
  missing and then returns; secondary registrations run only after
  AX is granted, which prevents a double Accessibility alert on
  Sequoia where Post Event is nested under Accessibility.
- Input Monitoring registration attempts CGEventTapCreate at
  kCGSessionEventTap (not kCGHIDEventTap) so a failure surfaces as
  an Input Monitoring signal rather than triggering an Accessibility
  prompt as a side effect.
- lan-mouse-gtk/src/window/imp.rs: handle_capture / handle_emulation
  switch on the missing-pane enum and navigate to the specific pane
  via x-apple.systempreferences:... URLs before re-requesting.
- lan-mouse-gtk/resources/window.ui: pill class on the Reenable
  buttons so the hover padding matches the rest of libadwaita.
- input-capture/src/macos.rs, input-emulation/src/macos.rs: make
  request_*_permission() a silent preflight (AXIsProcessTrusted /
  CGPreflightListenEventAccess / CGPreflightPostEventAccess), so the
  daemon no longer fires TCC prompts on retry — all prompting is
  owned by the GUI.
- input-capture/src/error.rs, input-emulation/src/error.rs: new
  error variants so the GUI can distinguish missing-AX from
  missing-IM / missing-PostEvent for pane routing.

Verified on macOS 15.5: first launch fires a single AX prompt;
second launch (AX granted) registers under Input Monitoring via the
session-tap attempt and requests Post Event. Sequoia auto-grants the
listen-only path via AX so the IM list may stay empty, which is the
intended OS behavior and no longer blocks capture.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 22:59:43 +02:00
Ferdinand Schober
38920917cd update ashpd 2026-04-08 13:11:18 +02:00
Ferdinand Schober
057f6e2567 macos: emulate double / triple click (#338) 2025-10-29 17:46:15 +01:00
Ferdinand Schober
eb1dcbddb0 update dependencies (#302)
* update dependencies

* update windows

* clippy: inline format args

* update flake

* update core-graphics

* fix poll after completion error

* fix ashpd?!
2025-10-08 16:10:32 +02:00
VassiliDev
3b811ea593 Remove newline 2025-01-24 16:26:09 +01:00
VassiliDev
b517679849 Remove redundant dep 2025-01-24 16:26:09 +01:00
VassiliDev
345804355a Keep modifier state in WLRoots input emulator 2025-01-24 16:26:09 +01:00
Ferdinand Schober
4703a4c947 chore: Release 2024-11-07 12:49:59 +01:00
Ferdinand Schober
a870a9e3a9 split features for emulation and capture backends 2024-11-07 12:43:42 +01:00
Ferdinand Schober
66456f18f1 update core-graphics / foundation (#227) 2024-11-07 01:15:35 +01:00
Ferdinand Schober
1d25dfbe50 upgrade ashpd + reis (#226) 2024-11-07 00:38:26 +01:00
Ferdinand Schober
9d28fe6c7b bump dependencies 2024-11-06 23:53:42 +01:00
Ferdinand Schober
7496015d8d macos: implement client side modifier events (#219)
closes #198
closes #199
2024-10-27 08:41:26 +01:00
Ferdinand Schober
ec412a5e74 chore: Release 2024-07-30 11:12:20 +02:00
Ferdinand Schober
0509b51a61 chore: Release 2024-07-30 11:06:27 +02:00
Ferdinand Schober
06ac390dbf chore: Release 2024-07-30 11:05:03 +02:00
Ferdinand Schober
dcc9250b6d fix repository url 2024-07-30 11:04:21 +02:00
Ferdinand Schober
376ae50b45 chore: Release 2024-07-30 11:03:08 +02:00
Ferdinand Schober
65fb228db5 upgrade dependencies 2024-07-19 12:58:52 +02:00
Ferdinand Schober
6a4dd740c3 code cleanup + purge anyhow in library code (#157) 2024-07-10 00:33:49 +02:00
Ferdinand Schober
37a8f729ea remove dispatch workaround 2024-07-05 01:41:11 +02:00
Ferdinand Schober
9abec63313 update dependencies 2024-07-03 11:11:50 +02:00
Ferdinand Schober
35e626976e add explicit version 2024-07-02 22:39:20 +02:00
Ferdinand Schober
4db2d37f32 split into input-{event,capture,emulation} 2024-07-02 22:07:37 +02:00