Set default output transform based on DRM panel orientation (#901)
This commit is contained in:
parent
a96394f7a6
commit
15a6425836
6 changed files with 40 additions and 19 deletions
|
|
@ -237,7 +237,7 @@ impl State {
|
|||
) {
|
||||
Ok((output, should_expose)) => {
|
||||
if should_expose {
|
||||
w += output.config().mode_size().w as u32;
|
||||
w += output.config().transformed_size().w as u32;
|
||||
wl_outputs.push(output.clone());
|
||||
}
|
||||
device.outputs.insert(conn, output);
|
||||
|
|
@ -335,7 +335,7 @@ impl State {
|
|||
) {
|
||||
Ok((output, should_expose)) => {
|
||||
if should_expose {
|
||||
w += output.config().mode_size().w as u32;
|
||||
w += output.config().transformed_size().w as u32;
|
||||
outputs_added.push(output.clone());
|
||||
}
|
||||
|
||||
|
|
@ -645,10 +645,10 @@ fn populate_modes(
|
|||
output.add_mode(mode);
|
||||
}
|
||||
output.set_preferred(output_mode);
|
||||
let transform = drm_helpers::panel_orientation(drm, conn).unwrap_or(Transform::Normal);
|
||||
output.change_current_state(
|
||||
Some(output_mode),
|
||||
// TODO: Readout property for monitor rotation
|
||||
Some(Transform::Normal),
|
||||
Some(transform),
|
||||
Some(Scale::Fractional(scale)),
|
||||
Some(Point::from((position.0 as i32, position.1 as i32))),
|
||||
);
|
||||
|
|
@ -663,6 +663,7 @@ fn populate_modes(
|
|||
position,
|
||||
max_bpc,
|
||||
scale,
|
||||
transform,
|
||||
..std::mem::take(&mut *output_config)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue