Skip to main content

reposition_output_on

Function reposition_output_on 

Source
pub(crate) fn reposition_output_on(
    state: &mut AppState,
    id: u32,
    x: i32,
    y: i32,
) -> bool
Expand description

Move an existing output (the primary included) to layout offset (x, y). The output’s advertised position, its Space mapping, and the windows placed on it (mapped at the output’s origin — window positions are output-relative under forced fullscreen) all follow, so absolute input injection and cursor compositing — both keyed off node.pos — resolve against the new layout immediately. A destination overlapping another live output is refused (false). As with CreateOutput, only the placement itself is validated: a capture reconfigure (StartCapture on an existing output) resizes UNVALIDATED, so keeping a multi-step relayout overlap-free at every step is the caller’s ordering responsibility.