Skip to main content

Module window_pictures

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§

WindowPicture
One window’s latest drawing.

Functions§

fitted_rect
Where picture goes fitted inside into: 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 picture fitted inside into (fitted_rect) through transform, clipped to where it lands; returns that rect, empty when the picture or into has 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
f of the latest picture of window group group, when one is kept.