Conversation
ploMP4
force-pushed
the
hints
branch
3 times, most recently
from
June 16, 2026 15:00
503cb28 to
e6482ec
Compare
Member
|
@ploMP4 please rename the commit based on scope. 🙏 |
tharropoulos
force-pushed
the
hints
branch
2 times, most recently
from
July 3, 2026 12:47
10e740a to
2ef6e66
Compare
tharropoulos
reviewed
Jul 3, 2026
|
|
||
| Detection is pluggable behind a `HintDetector` trait, selected by `hint.detector`: | ||
|
|
||
| - **`atspi`** (Linux, built in): reads the desktop [AT-SPI](https://docs.rs/atspi) accessibility tree over D-Bus and uses each interactive element's *own* role and bounding box. This is the most accurate source where it works — exact boxes, real semantics (button, link, menu item, table row…), no pixel guesswork, essentially no false positives. Each application's whole tree is fetched in a single bulk call (with all apps queried concurrently), so detection stays fast even on browser pages with thousands of nodes; children that toolkits materialize lazily (GTK tree and list views) are pulled in with batched follow-up calls, and an app that hasn't built its tree yet is nudged into doing so (its first hint launch may be sparse, the next one is complete). Coverage depends on the app: GTK/Qt/Gecko expose rich trees, Electron/Chromium need accessibility enabled, and games/native canvases expose nothing. On Wayland a client can't know its own window's on-screen position, so AT-SPI coordinates come in window-relative; stochos corrects them using the compositor's real window geometry and hints the active window, where a click is going. Geometry comes from a per-compositor provider (`src/hint/compositor/`, one file each — currently **Hyprland** and **Sway** via their IPC sockets; adding a compositor means adding one provider file). On X11 coordinates are already absolute and every visible window is hinted. Caveats: on Wayland compositors without a provider the semantic coordinates may be offset (the CV detector remains position-correct everywhere), and only the primary monitor is handled. |
ploMP4
marked this pull request as ready for review
July 6, 2026 15:33
tharropoulos
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.