Expand description
Placing a session’s physical pixel inside a Wayland input region.
Every other platform takes absolute coordinates in a space this crate can name at compile time — logical points on macOS, physical pixels on Windows and X11. Wayland does not. Absolute pointer motion is bounded by a region the compositor grants at runtime, derived from the screencast stream the user consented to share, and expressed in the compositor’s logical pixels. “Exact physical pixel” on Wayland therefore means “exact pixel within a region you were granted”.
So the last hop of the conversion cannot live in crate::convert
with the others: it needs a runtime fact. What lives here is the
arithmetic — regions and monitors in, a placement out — so the part
that decides where to click stays testable without a compositor. The
injector supplies the regions; it does no math of its own.
Two rules carried over from crate::convert, for the same reason:
the divisor is the containing monitor’s scale as the session
recorded it, never a desktop-wide one; and a point that does not land
is refused, never clamped. A clamped point clicks somewhere
plausible and wrong, which is worse than an error.
Structs§
- Placement
- A point resolved into one region’s logical space.
- Region
- One absolute-input region, as the compositor described it.
Enums§
- Place
Error - Why a physical point could not be placed in any granted region.