pub(crate) fn mount_fullscreen(
world: &mut World,
ui: Entity,
request: Entity,
state: Entity,
)Expand description
Mount the fullscreen button in the window’s top-right corner.
A button rather than the old “the first press asks for fullscreen”: a press on the canvas is not discoverable — a phone shows no hint that it would work, and nothing tells a user who left fullscreen that they may ask again — whereas a button is visible on every platform and keeps working after the browser has left fullscreen. Nothing about the request is latched, so the display can be entered and left as often as the button is pressed.
The click is recorded rather than served here: a panel runs while the world
is borrowed, and it has no window to ask; the frame loop reads the request
and calls fullscreen::toggle, which is where a browser accepts it from.