Module window_pictures
Expand description
Live pictures of this device’s own windows, drawn by their apps.
Some chrome shows a window small somewhere else: a peek at what another
person has open shows the windows of theirs this device also holds, as
this device’s own replica draws them. A thumbnail captured from the
screen would be a second way of showing a window; this is the same
drawing the window just made. A host says which windows it shows small
(want); while it does, the strip keeps a copy of each one’s drawing
every time it draws or replays it, and the host paints that copy where
it wants (paint_fitted).
A drawing is kept only when it stands on its own and shows nothing private: one that drew pixels living outside the scene (a client’s GPU buffer, valid for one frame) or showed a secret (a password field) is never kept, and the host shows the window’s app mark instead. A blurred material the window carried is left out of its picture: its backdrop is the screen behind the window, which a miniature does not have. Nothing is kept, and nothing costs more than one look at an empty list, while no window is wanted.
Structs§
- Window
Picture - One window’s latest drawing.
Functions§
- fitted_
rect - Where
picturegoes fitted insideinto: as large as fits, keeping its shape, centred. - owes_
any - Whether any newly wanted window still waits for its first picture: a host showing pictures asks for one more frame while it does.
- paint_
fitted - Paint
picturefitted insideinto(fitted_rect) throughtransform, clipped to where it lands; returns that rect, empty when the picture orintohas no area. - want
- Keep the drawings of exactly
groups(window group ids) from now on, dropping every picture of a window no longer among them. Empty keeps nothing. - with_
picture fof the latest picture of window groupgroup, when one is kept.