Module window_preview
Expand description
WindowPreview: where a window’s live picture shows in a view, as WindowWell names where
the window itself goes.
A view that shows windows small (the switcher, a canvas’s miniature of a desk) never draws their pixels: it puts a preview where the picture goes, and the compositor draws that window’s own latest buffer there, in its own pixels. The preview draws nothing and takes no input; what a person sees under it is the view’s own, and the picture covers it.
After each layout, and on each frame an enclosing component moves it, it reports its
rectangle in layout coordinates to the host’s Previews, keyed by the window’s key in the
reading it stands for. The host that hands the compositor its pictures reads those
rectangles, so a preview that moves moves its picture in the same frame.
The preview is a leaf with the shape of a window’s own 16:10 well: it takes the width its frame gives it and stands as tall as that width makes a window.
Structs§
- Installed
- The previews installed by
install, restored when dropped. - Previews
- Where the previews of a tree on this thread report, shared with the host that hands the compositor each window’s live picture there: the same handle, so a preview that moves moves its picture.
- Window
Preview - See the module docs.
- Window
Preview Props - A window’s live picture, at the rectangle the preview stands at: the compositor draws the window’s own pixels there, so the preview draws nothing and takes no input.
Functions§
- install
- Report every preview laid out on this thread from now on into
previews, until the returned guard is dropped: how a host shares one handle with the compositor drawing its pictures. A guard that is already installed nests and restores the one before.