Skip to main content

windows_on_display

Function windows_on_display 

Source
pub(crate) fn windows_on_display(
    state: &AppState,
    display_id: u32,
    output: &Output,
) -> Vec<Window>
Expand description

Resize a screen’s output, keeping its position, so the displays cut out of it can be laid out over a different desk.

Refused for a view (it has no output of its own) and for a size that would leave one of the screen’s views outside it – the caller grows the screen before moving views onto the new area and shrinks it after taking them off, so no view is ever orphaned. Send every non-parked window on display_id’s output a fullscreen configure for the new mode, with the scale each surface should render at. Without this a live session keeps drawing at the old size under the resized screen. The windows a mode change on an output reaches: under the window policy the ones the policy placed on it, else the ones tagged for the display. A parked screen’s windows are left out either way: they are tagged for a display but composited on none, holding PARKED_LOGICAL_SIZE until create_output gives them a screen, and resizing them would double the session’s coordinate space onto a screen nobody watches, which is where a window that centers itself then lands.