#[repr(C)]pub struct PointerSeat {
pub seat_id: u64,
pub state: MouseState,
}Expand description
One ADDITIONAL pointer seat (9b-ii): an independent cursor with its own position, buttons and hover, next to the primary one.
A SEAT is not a DEVICE. MouseState::pointer_device_id names the physical
hardware that last drove a cursor; a seat is the cursor itself. The
distinction is the whole design: on Windows, macOS, Android and iOS the OS
merges every mouse into ONE cursor, so two mice are two devices driving one
seat - a click from the second mouse after a move from the first lands
where the first left the cursor, because that IS where the cursor is.
Keying state by device would have split that one cursor into two entries
with different positions, and dispatched the click somewhere the user
could not see. Only X11 (MPX master pointers) and Wayland (one wl_seat
per user) can present a second cursor, and only there does a second entry
exist.
The primary seat is NOT in pointer_seats; it stays mouse_state so
every existing reader of “the mouse” keeps meaning what it meant.
Fields§
§seat_id: u64The platform’s identity for this cursor - an X11 master pointer id,
a Wayland seat’s global name. Never PRIMARY_POINTER_SEAT.
state: MouseStateThe seat’s own cursor state.
Trait Implementations§
Source§impl Clone for PointerSeat
impl Clone for PointerSeat
Source§fn clone(&self) -> PointerSeat
fn clone(&self) -> PointerSeat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PointerSeat
Source§impl Debug for PointerSeat
impl Debug for PointerSeat
impl Eq for PointerSeat
Source§impl Extend<PointerSeat> for PointerSeatVec
impl Extend<PointerSeat> for PointerSeatVec
Source§fn extend<T: IntoIterator<Item = PointerSeat>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = PointerSeat>>(&mut self, iter: T)
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)