Settings

Theme

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

github.com

1 points by wlswo 2 months ago · 4 comments

Reader

anansichantha 2 months 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 2 months 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 2 months ago

so sick

Keyboard Shortcuts

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