Expand description
A person resizes the pane: the virtual screen follows (the RANDR extension), and the browser’s maximised window with it. Xvfb can make
its screen smaller or bigger only up to the size it was started with, so a session starts the screen at MAX_W by MAX_H and sets it to
the pane’s size at once, and every later resize is a new mode of that screen. Nothing here attaches to the browser.
Structs§
- Settle
- The last size the pane asked for, until it has stayed the same for
SETTLE: then it is due.
Constants§
- MAX_H
- MAX_W
- MIN_
SIDE - The smallest side of a screen, and the largest screen a session can have (the size its Xvfb is started with).
- MODE_
PREFIX 🔒 - The prefix of the names of the modes this makes, so the ones no longer used can be told from the screen’s own.
- SETTLE
- How long the pane’s size must stay the same before the screen is resized (a drag sends many sizes).
Functions§
- bridge
- The size the screen is set to first, so that the screen’s output (which is as big as the screen was) fits in it while it changes size: big enough for both the old size and the new.
- clamp
- A size asked for, cut to what a screen can be.
- found 🔒
- The id of the mode that is
wbyhand was made by this, if the screen has it. - millimetres
- The millimetres a side of
pixelsis, at the 96 dots an inch the screen is made with. - mode_
name - The name of the mode for a size.
- named 🔒
- Each mode’s id and name (the names are one run of bytes, in the order of the modes).
- ours 🔒
- The modes this made.