Skip to main content

set_screen_geometry

Function set_screen_geometry 

Source
pub fn set_screen_geometry(
    socket_path: &str,
    index: usize,
    size: (i32, i32),
    scale: f64,
) -> Result<ScaleOutcome, String>
Expand description

Give the index-th screen of the compositor on socket_path this mode and scale in one configuration.

A session lays its desktop out once per applied configuration, so setting the two separately leaves it briefly at a geometry that never exists — a screen still carrying the pre-connect mode at the new scale is a fraction of its final size, and a client that does not lay out again keeps that size.