Settings

Theme

Xray – A minimal screenshot tool for developers (Rust/Tauri)

github.com

1 points by wlswo 21 days ago · 4 comments

Reader

anansichantha 21 days ago

Great to see more system-level tools being built with Tauri. I'm curious about how you're handling the performance overhead of the global hover event. Is the backend polling the Accessibility API via AXUIElementCopyElementAtPosition, or are you using a more event-driven approach?

  • wlswoOP 21 days ago

    Implementation Details: We currently use a hybrid polling approach rather than a pure event-driven one.

    Mechanism: The Rust backend runs a high-priority background loop using AXUIElementCopyElementAtPosition to track the element under the cursor.

    Optimization: To minimize overhead, the polling frequency is throttled and only ramps up when the overlay is active. We use CoreGraphics to first detect mouse movement delta before triggering the heavier Accessibility API calls.

gracefang 21 days ago

so sick

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection